1店铺折扣活动逻辑 2数据库选品上货记录每次提交的draft_id以备后续使用

This commit is contained in:
wule committed 2025-08-05 18:54:19 +08:00
1 parent f73f56eea4
commit 85ed4137d2
13 files changed
+861 -104

No files matched your search

+2 -2
View File
@@ -27,8 +27,8 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 398;
//public static int VersionCount = 398;
public static int VersionCount = 500;
//public static int VersionCount = 500;
/// <summary>
/// 版本号
+1 -1
View File
@@ -43,7 +43,7 @@ namespace AllBase.Model.Result
public long? endTime { get; set; }
public List<TemuActivityLabelInfo> activityLabelList { get; set; }
public string activityThematicName { get; set; }
public string discount { get; set; } = "-";
public string discount { get; set; } = "";
}
public class TemuActivitySiteInfo
@@ -389,12 +389,17 @@ namespace KJD_Web.BLL
var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
var draft_id = RegexUtils.GetStringQuery(ref inputData, "draft_id")?.Replace("'", "\\'");
var up_spu_id = RegexUtils.GetStringQuery(ref inputData, "up_spu_id")?.Replace("'", "\\'");
var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'");
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
var add_times = RegexUtils.GetStringQuery(ref inputData, "add_times")?.Replace("'", "\\'");
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "update kjd.product_select set";
string sql = "";
if (!string.IsNullOrEmpty(up_spu_id) && !string.IsNullOrEmpty(draft_id))
sql += "insert into kjd.spu_map (draft_id,from_spu_id,shop_id) values(" + draft_id + "," + up_spu_id + ",'" + shop_id + "');";
sql += "update kjd.product_select set";
if (draft_id != null)
sql += " draft_id='" + draft_id + "',";
if (status != null)
@@ -352,12 +352,17 @@ namespace KJD_Web.BLL
var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'");
var draft_id = RegexUtils.GetStringQuery(ref inputData, "draft_id")?.Replace("'", "\\'");
var up_spu_id = RegexUtils.GetStringQuery(ref inputData, "up_spu_id")?.Replace("'", "\\'");
var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'");
var status = RegexUtils.GetStringQuery(ref inputData, "status")?.Replace("'", "\\'");
var add_times = RegexUtils.GetStringQuery(ref inputData, "add_times")?.Replace("'", "\\'");
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "update kjd.third_product_select set";
string sql = "";
if (!string.IsNullOrEmpty(up_spu_id) && !string.IsNullOrEmpty(draft_id))
sql += "insert into kjd.spu_map (draft_id,from_spu_id,shop_id) values(" + draft_id + "," + up_spu_id + ",'" + shop_id + "');";
sql += "update kjd.third_product_select set";
if (draft_id != null)
sql += " draft_id='" + draft_id + "',";
if (status != null)
+9
View File
@@ -445,6 +445,12 @@
<Compile Include="KJDForms\SalesCenterForms\Old\SeckillingAndLimitedSalesShopForm.Designer.cs">
<DependentUpon>SeckillingAndLimitedSalesShopForm.cs</DependentUpon>
</Compile>
<Compile Include="KJDForms\SalesCenterForms\UcActivityDiscountCtrl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="KJDForms\SalesCenterForms\UcActivityDiscountCtrl.Designer.cs">
<DependentUpon>UcActivityDiscountCtrl.cs</DependentUpon>
</Compile>
<Compile Include="KJDForms\ShopForms\Old\FreightTemplateForm.cs">
<SubType>Form</SubType>
</Compile>
@@ -999,6 +1005,9 @@
<EmbeddedResource Include="KJDForms\SalesCenterForms\Old\SeckillingAndLimitedSalesShopForm.resx">
<DependentUpon>SeckillingAndLimitedSalesShopForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="KJDForms\SalesCenterForms\UcActivityDiscountCtrl.resx">
<DependentUpon>UcActivityDiscountCtrl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="KJDForms\ShopForms\Old\FreightTemplateForm.resx">
<DependentUpon>FreightTemplateForm.cs</DependentUpon>
<SubType>Designer</SubType>
@@ -612,7 +612,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
var url = BaseClass.BuildObjString("product/mdy_user_select_product_status");
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&draft_id=" + productDraftId +
"&draft_id=" + productDraftId + // draft_id即商品spuid
"&up_spu_id=" + prod.spu_id +
"&shop_id=" + prod.shop_id +
"&status=已上传";
var html = GetHtml.PostUtf8(url, data);
@@ -628,7 +628,9 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
var url = BaseClass.BuildObjString("product_third/mdy_user_select_product_status");
var data = UserLogin.GetSignaturex() +
"&db_id=" + prod.id +
"&draft_id=" + productDraftId +
"&draft_id=" + productDraftId + // draft_id即商品spuid
"&up_spu_id=" + prod.spu_id +
"&shop_id=" + prod.shop_id +
"&status=已上传";
var html = GetHtml.PostUtf8(url, data);
@@ -44,6 +44,23 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.actDiscount80 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl();
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.ucCheckBox2 = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.ucCheckBox3 = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.actDiscount85 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl();
this.object_5db00808_c6be_4ffa_a702_9b91e2208933 = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.ucCheckBox1 = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.actDiscount70 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl();
this.chkDiscount6 = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.actDiscount60 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl();
this.panelEx2 = new DevComponents.DotNetBar.PanelEx();
this.chkFullShop = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkNoSaleProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.panel1 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.numNoSaleDays = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
@@ -80,8 +97,6 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.colInventory = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.chkFullShop = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.chkNoSaleProd = new TemuKJD.UserComponent.UcCheckBox(this.components);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@@ -102,6 +117,12 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.splitContainer4.Panel1.SuspendLayout();
this.splitContainer4.Panel2.SuspendLayout();
this.splitContainer4.SuspendLayout();
this.ucGroupBoxEx3.SuspendLayout();
this.actDiscount80.SuspendLayout();
this.actDiscount85.SuspendLayout();
this.actDiscount70.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numNoSaleDays)).BeginInit();
this.ucGroupBoxEx1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
@@ -262,6 +283,14 @@ namespace TemuKJD.KJDForms.SalesCenterForms
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx3.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx3.Controls.Add(this.actDiscount80);
this.ucGroupBoxEx3.Controls.Add(this.actDiscount85);
this.ucGroupBoxEx3.Controls.Add(this.actDiscount70);
this.ucGroupBoxEx3.Controls.Add(this.actDiscount60);
this.ucGroupBoxEx3.Controls.Add(this.panelEx2);
this.ucGroupBoxEx3.Controls.Add(this.chkFullShop);
this.ucGroupBoxEx3.Controls.Add(this.chkNoSaleProd);
this.ucGroupBoxEx3.Controls.Add(this.panel1);
this.ucGroupBoxEx3.Location = new System.Drawing.Point(272, 2);
this.ucGroupBoxEx3.Name = "ucGroupBoxEx3";
this.ucGroupBoxEx3.Size = new System.Drawing.Size(704, 120);
@@ -269,6 +298,211 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.ucGroupBoxEx3.TabStop = false;
this.ucGroupBoxEx3.Text = "活动设置";
//
// actDiscount80
//
this.actDiscount80.AutoSize = true;
this.actDiscount80.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.actDiscount80.Controls.Add(this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f);
this.actDiscount80.Controls.Add(this.ucCheckBox2);
this.actDiscount80.Controls.Add(this.ucCheckBox3);
this.actDiscount80.Discount = 80;
this.actDiscount80.Inventory = 10;
this.actDiscount80.IsDefaultInventory = false;
this.actDiscount80.Location = new System.Drawing.Point(15, 82);
this.actDiscount80.Name = "actDiscount80";
this.actDiscount80.Size = new System.Drawing.Size(249, 21);
this.actDiscount80.TabIndex = 715;
//
// object_6dcc57fe_428d_475c_90c2_d99d71a7014f
//
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.AutoSize = true;
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Location = new System.Drawing.Point(198, 2);
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Margin = new System.Windows.Forms.Padding(0);
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Name = "object_6dcc57fe_428d_475c_90c2_d99d71a7014f";
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Size = new System.Drawing.Size(48, 16);
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.TabIndex = 706;
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Text = "默认";
this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.UseVisualStyleBackColor = true;
//
// ucCheckBox2
//
this.ucCheckBox2.AutoSize = true;
this.ucCheckBox2.Location = new System.Drawing.Point(198, 2);
this.ucCheckBox2.Name = "ucCheckBox2";
this.ucCheckBox2.Size = new System.Drawing.Size(48, 16);
this.ucCheckBox2.TabIndex = 706;
this.ucCheckBox2.Text = "默认";
this.ucCheckBox2.UseVisualStyleBackColor = true;
//
// ucCheckBox3
//
this.ucCheckBox3.AutoSize = true;
this.ucCheckBox3.Location = new System.Drawing.Point(198, 2);
this.ucCheckBox3.Name = "ucCheckBox3";
this.ucCheckBox3.Size = new System.Drawing.Size(48, 16);
this.ucCheckBox3.TabIndex = 706;
this.ucCheckBox3.Text = "默认";
this.ucCheckBox3.UseVisualStyleBackColor = true;
//
// actDiscount85
//
this.actDiscount85.AutoSize = true;
this.actDiscount85.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.actDiscount85.Controls.Add(this.object_5db00808_c6be_4ffa_a702_9b91e2208933);
this.actDiscount85.Controls.Add(this.ucCheckBox1);
this.actDiscount85.Discount = 85;
this.actDiscount85.Inventory = 10;
this.actDiscount85.IsDefaultInventory = false;
this.actDiscount85.Location = new System.Drawing.Point(288, 82);
this.actDiscount85.Name = "actDiscount85";
this.actDiscount85.Size = new System.Drawing.Size(249, 21);
this.actDiscount85.TabIndex = 711;
//
// object_5db00808_c6be_4ffa_a702_9b91e2208933
//
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.AutoSize = true;
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Location = new System.Drawing.Point(198, 2);
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Name = "object_5db00808_c6be_4ffa_a702_9b91e2208933";
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Size = new System.Drawing.Size(48, 16);
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.TabIndex = 706;
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Text = "默认";
this.object_5db00808_c6be_4ffa_a702_9b91e2208933.UseVisualStyleBackColor = true;
//
// ucCheckBox1
//
this.ucCheckBox1.AutoSize = true;
this.ucCheckBox1.Location = new System.Drawing.Point(198, 2);
this.ucCheckBox1.Name = "ucCheckBox1";
this.ucCheckBox1.Size = new System.Drawing.Size(48, 16);
this.ucCheckBox1.TabIndex = 706;
this.ucCheckBox1.Text = "默认";
this.ucCheckBox1.UseVisualStyleBackColor = true;
//
// actDiscount70
//
this.actDiscount70.AutoSize = true;
this.actDiscount70.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.actDiscount70.Controls.Add(this.chkDiscount6);
this.actDiscount70.Discount = 70;
this.actDiscount70.Inventory = 10;
this.actDiscount70.IsDefaultInventory = false;
this.actDiscount70.Location = new System.Drawing.Point(288, 54);
this.actDiscount70.Name = "actDiscount70";
this.actDiscount70.Size = new System.Drawing.Size(249, 21);
this.actDiscount70.TabIndex = 710;
//
// chkDiscount6
//
this.chkDiscount6.AutoSize = true;
this.chkDiscount6.Location = new System.Drawing.Point(198, 2);
this.chkDiscount6.Name = "chkDiscount6";
this.chkDiscount6.Size = new System.Drawing.Size(48, 16);
this.chkDiscount6.TabIndex = 706;
this.chkDiscount6.Text = "默认";
this.chkDiscount6.UseVisualStyleBackColor = true;
//
// actDiscount60
//
this.actDiscount60.AutoSize = true;
this.actDiscount60.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.actDiscount60.Discount = 60;
this.actDiscount60.Inventory = 10;
this.actDiscount60.IsDefaultInventory = false;
this.actDiscount60.Location = new System.Drawing.Point(15, 54);
this.actDiscount60.Name = "actDiscount60";
this.actDiscount60.Size = new System.Drawing.Size(246, 21);
this.actDiscount60.TabIndex = 709;
//
// panelEx2
//
this.panelEx2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx2.Cursor = System.Windows.Forms.Cursors.Hand;
this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.panelEx2.Location = new System.Drawing.Point(619, 32);
this.panelEx2.Name = "panelEx2";
this.panelEx2.Size = new System.Drawing.Size(70, 23);
this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx2.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.panelEx2.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.panelEx2.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.panelEx2.Style.ForeColor.Color = System.Drawing.Color.White;
this.panelEx2.Style.GradientAngle = 90;
this.panelEx2.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx2.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.panelEx2.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.panelEx2.TabIndex = 701;
this.panelEx2.Text = "报名活动";
this.panelEx2.Click += new System.EventHandler(this.btnSignActivity_Click);
//
// chkFullShop
//
this.chkFullShop.AutoSize = true;
this.chkFullShop.Checked = true;
this.chkFullShop.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkFullShop.Location = new System.Drawing.Point(18, 27);
this.chkFullShop.Name = "chkFullShop";
this.chkFullShop.Size = new System.Drawing.Size(96, 16);
this.chkFullShop.TabIndex = 684;
this.chkFullShop.Text = "报名全店活动";
this.chkFullShop.UseVisualStyleBackColor = true;
this.chkFullShop.CheckedChanged += new System.EventHandler(this.chkFullShop_CheckedChanged);
//
// chkNoSaleProd
//
this.chkNoSaleProd.AutoSize = true;
this.chkNoSaleProd.Location = new System.Drawing.Point(120, 27);
this.chkNoSaleProd.Name = "chkNoSaleProd";
this.chkNoSaleProd.Size = new System.Drawing.Size(96, 16);
this.chkNoSaleProd.TabIndex = 685;
this.chkNoSaleProd.Text = "算法报名活动";
this.chkNoSaleProd.UseVisualStyleBackColor = true;
this.chkNoSaleProd.CheckedChanged += new System.EventHandler(this.chkNoSaleProd_CheckedChanged);
//
// panel1
//
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.numNoSaleDays);
this.panel1.Controls.Add(this.label1);
this.panel1.Location = new System.Drawing.Point(223, 24);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(311, 24);
this.panel1.TabIndex = 722;
this.panel1.Visible = false;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(156, 5);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(101, 12);
this.label2.TabIndex = 725;
this.label2.Text = "天,且未出单商品";
//
// numNoSaleDays
//
this.numNoSaleDays.Location = new System.Drawing.Point(110, 1);
this.numNoSaleDays.Name = "numNoSaleDays";
this.numNoSaleDays.Size = new System.Drawing.Size(40, 21);
this.numNoSaleDays.TabIndex = 724;
this.numNoSaleDays.Value = new decimal(new int[] {
30,
0,
0,
0});
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 5);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(101, 12);
this.label1.TabIndex = 723;
this.label1.Text = "设置加站时间超过";
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -682,28 +916,6 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.statusBar.Size = new System.Drawing.Size(700, 26);
this.statusBar.TabIndex = 2;
//
// chkFullShop
//
this.chkFullShop.AutoSize = true;
this.chkFullShop.Location = new System.Drawing.Point(18, 22);
this.chkFullShop.Name = "chkFullShop";
this.chkFullShop.Size = new System.Drawing.Size(96, 16);
this.chkFullShop.TabIndex = 684;
this.chkFullShop.Text = "报名全店活动";
this.chkFullShop.UseVisualStyleBackColor = true;
this.chkFullShop.CheckedChanged += new System.EventHandler(this.chkFullShop_CheckedChanged);
//
// chkNoSaleProd
//
this.chkNoSaleProd.AutoSize = true;
this.chkNoSaleProd.Location = new System.Drawing.Point(18, 44);
this.chkNoSaleProd.Name = "chkNoSaleProd";
this.chkNoSaleProd.Size = new System.Drawing.Size(96, 16);
this.chkNoSaleProd.TabIndex = 685;
this.chkNoSaleProd.Text = "算法报名活动";
this.chkNoSaleProd.UseVisualStyleBackColor = true;
this.chkNoSaleProd.CheckedChanged += new System.EventHandler(this.chkNoSaleProd_CheckedChanged);
//
// MarketingActivityForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -734,6 +946,17 @@ namespace TemuKJD.KJDForms.SalesCenterForms
this.splitContainer4.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false);
this.ucGroupBoxEx3.ResumeLayout(false);
this.ucGroupBoxEx3.PerformLayout();
this.actDiscount80.ResumeLayout(false);
this.actDiscount80.PerformLayout();
this.actDiscount85.ResumeLayout(false);
this.actDiscount85.PerformLayout();
this.actDiscount70.ResumeLayout(false);
this.actDiscount70.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numNoSaleDays)).EndInit();
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
@@ -792,5 +1015,20 @@ namespace TemuKJD.KJDForms.SalesCenterForms
private System.Windows.Forms.DataGridViewTextBoxColumn colDiscount;
private System.Windows.Forms.DataGridViewTextBoxColumn colActivityMsg;
private UserComponent.UcCheckBox chkGetDiscount;
private DevComponents.DotNetBar.PanelEx panelEx2;
private UcActivityDiscountCtrl actDiscount85;
private UserComponent.UcCheckBox object_5db00808_c6be_4ffa_a702_9b91e2208933;
private UserComponent.UcCheckBox ucCheckBox1;
private UcActivityDiscountCtrl actDiscount70;
private UserComponent.UcCheckBox chkDiscount6;
private UcActivityDiscountCtrl actDiscount60;
private UcActivityDiscountCtrl actDiscount80;
private UserComponent.UcCheckBox object_6dcc57fe_428d_475c_90c2_d99d71a7014f;
private UserComponent.UcCheckBox ucCheckBox2;
private UserComponent.UcCheckBox ucCheckBox3;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.NumericUpDown numNoSaleDays;
private System.Windows.Forms.Label label1;
}
}
@@ -25,6 +25,8 @@ namespace TemuKJD.KJDForms.SalesCenterForms
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
public List<TemuActivityThematicInfo> lstActivityThematic { get; set; } = new List<TemuActivityThematicInfo>();
public List<string> lstShopIdSelect = new List<string>();
public List<int> lstDiscount = new List<int>() { 60, 70, 80, 85 };
public Dictionary<string, List<SubOrderInfo>> dicNoSaleProd = new Dictionary<string, List<SubOrderInfo>>();
public MarketingActivityForm()
{
@@ -200,11 +202,23 @@ namespace TemuKJD.KJDForms.SalesCenterForms
private void chkFullShop_CheckedChanged(object sender, EventArgs e)
{
if (chkFullShop.Checked)
chkNoSaleProd.Checked = false;
else
chkNoSaleProd.Checked = true;
}
private void chkNoSaleProd_CheckedChanged(object sender, EventArgs e)
{
if (chkNoSaleProd.Checked)
{
chkFullShop.Checked = false;
panel1.Visible = true;
}
else
{
chkFullShop.Checked = true;
panel1.Visible = false;
}
}
private void btnSearchActivity_Click(object sender, EventArgs e)
@@ -257,27 +271,8 @@ namespace TemuKJD.KJDForms.SalesCenterForms
continue;
#region 检测登录
if (shop.LoginStatus2 != "国际版在线")
{
if (!CheckLogin(shop))
continue;
}
if (ShopListForm.Instance == null)
ShopListForm.Instance = new ShopListForm();
ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
if (shop.LoginStatus2 != "国际版在线")
{
Invoke(new Action(() =>
{
var rows = this.dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colShopLoginName"].Value.ToString() == shop.LoginName);
foreach (var row in rows)
{
row.Cells["colMessage"].Value = "店铺掉线";
row.Cells["colLoginStatus"].Value = "国际版未登录";
row.Cells["colCanUse"].Value = false;
}
}));
continue;
}
#endregion
Invoke(new Action(() =>
@@ -301,8 +296,8 @@ namespace TemuKJD.KJDForms.SalesCenterForms
int tryCount = 0;
tryAgain:
Thread.Sleep(100 + Randomx.GetId(200));
string jsonStr = GetActivityList(shop);
if (jsonStr.Contains("指定的值含有无效的控制字符"))
string jsonRst = GetActivityList(shop);
if (jsonRst.Contains("指定的值含有无效的控制字符"))
{
Invoke(new Action(() =>
{
@@ -318,28 +313,28 @@ namespace TemuKJD.KJDForms.SalesCenterForms
isError = true;
break;
}
if (jsonStr.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
if (jsonRst.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
{
tryCount++;
goto tryAgain;
}
if (!jsonStr.Contains("\"success\":true"))
if (!jsonRst.Contains("\"success\":true"))
{
isError = true;
string sErr = BaseRegex.GetStringJson(ref jsonStr, "errorMsg");
string sErr = BaseRegex.GetStringJson(ref jsonRst, "errorMsg");
if (!string.IsNullOrWhiteSpace(sErr) && !errMsg.Contains(sErr))
errMsg += sErr + " ";
page++;
continue;
}
if (jsonStr.Contains("\"success\":true"))
if (jsonRst.Contains("\"success\":true"))
{
var jArr = new JArray();
try
{
var jObj = JObject.Parse(jsonStr);
var jObj = JObject.Parse(jsonRst);
jArr = jObj["result"]?["activityList"] as JArray;
if (jArr == null)
jArr = new JArray();
@@ -356,12 +351,13 @@ namespace TemuKJD.KJDForms.SalesCenterForms
{
lstActivityThematic.Add(pInfo);
string name = pInfo.activityThematicName;
pInfo.discount = BaseRegex.GetMatchRegexString(ref name, "(\\d{1,3}折)");
pInfo.discount = string.IsNullOrWhiteSpace(pInfo.discount) ? "-" : pInfo.discount;
pInfo.discount = BaseRegex.GetMatchRegexString(ref name, "(\\d{1,3}折)").ParseToString();
pInfo.discount = pInfo.discount.Replace("折", "");
pInfo.discount = string.IsNullOrWhiteSpace(pInfo.discount) ? "" : pInfo.discount;
}
}
int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt();
int total = BaseRegex.GetStringJson(ref jsonRst, "total").ParseToInt();
totalPage = Math.Ceiling(total / 10.0).ParseToInt();
}
page++;
@@ -390,17 +386,29 @@ namespace TemuKJD.KJDForms.SalesCenterForms
foreach (var actInfo in lstActivityThematic)
{
string sActivityTime = BaseClass.StampToDateTime((int)(actInfo.startTime.ParseToLong() / 1000)).ToString("yyyy/MM/dd HH:mm:ss") + "~" +
BaseClass.StampToDateTime((int)(actInfo.endTime.ParseToLong() / 1000)).ToString("yyyy/MM/dd HH:mm:ss") + "(" +
actInfo.durationDays + "天)";
string sActivityRemaining = "";
TimeSpan timeRemaining = BaseClass.StampToDateTime((int)(actInfo.enrollDeadLine.ParseToLong() / 1000)) - DateTime.Now;
if (timeRemaining.Days >= 1)
sActivityRemaining = timeRemaining.Days + "天后截止";
else if (timeRemaining.Hours >= 1)
sActivityRemaining = timeRemaining.Hours + "小时后截止";
else if (timeRemaining.Minutes >= 1)
sActivityRemaining = timeRemaining.Minutes + "分钟后截止";
else
sActivityRemaining = timeRemaining.Seconds + "秒后截止";
Invoke(new Action(() =>
{
int rowId = this.dgvActivity.Rows.Add(
false,
actInfo.activityThematicId,
actInfo.activityThematicName,
BaseClass.StampToDateTime((int)(actInfo.startTime.ParseToLong() / 1000)).ToString("yyyy/MM/dd HH:mm:ss") + "~" +
BaseClass.StampToDateTime((int)(actInfo.endTime.ParseToLong() / 1000)).ToString("yyyy/MM/dd HH:mm:ss") + "(" +
actInfo.durationDays + "天)",
(BaseClass.StampToDateTime((int)(actInfo.enrollDeadLine.ParseToLong() / 1000)) - DateTime.Now).Days + "天后截止",
actInfo.discount
sActivityTime,
sActivityRemaining,
string.IsNullOrEmpty(actInfo.discount)? "-" : actInfo.discount.TrimEnd('0') + "折"
);
dgvActivity.Rows[rowId].Height = 40;
@@ -459,7 +467,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
if (actRow == null)
continue;
if (!string.IsNullOrWhiteSpace(actInfo.discount) && actInfo.discount != "-")
if (!string.IsNullOrWhiteSpace(actInfo.discount))
{
this.Invoke(new Action(() =>
{
@@ -493,35 +501,18 @@ namespace TemuKJD.KJDForms.SalesCenterForms
}));
#region 检测登录
if (shop.LoginStatus2 != "国际版在线")
{
continue;
}
if (ShopListForm.Instance == null)
ShopListForm.Instance = new ShopListForm();
if (shop.LastRefreshDate == "")
ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
if (shop.LoginStatus2 != "国际版在线")
{
Invoke(new Action(() =>
{
var shopRows = this.dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colShopLoginName"].Value.ToString() == shop.LoginName);
foreach (var r in shopRows)
{
r.Cells["colMessage"].Value = "店铺掉线";
r.Cells["colLoginStatus"].Value = "国际版未登录";
r.Cells["colCanUse"].Value = false;
}
}));
continue;
}
if (!CheckLogin(shop))
continue;
}
#endregion
int tryCount = 0;
tryAgain:
Thread.Sleep(100 + Randomx.GetId(200));
string jsonStr = GetActivityMatch(shop, actInfo.activityThematicId.ParseToLong());
if (jsonStr.Contains("指定的值含有无效的控制字符"))
string jsonRst = GetActivityMatch(shop, actInfo.activityThematicId.ParseToLong());
if (jsonRst.Contains("指定的值含有无效的控制字符"))
{
Invoke(new Action(() =>
{
@@ -535,26 +526,26 @@ namespace TemuKJD.KJDForms.SalesCenterForms
}));
continue;
}
if (jsonStr.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
if (jsonRst.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
{
tryCount++;
goto tryAgain;
}
if (jsonStr.Contains("当前操作人数太多,请稍后重试"))
if (jsonRst.Contains("当前操作人数太多,请稍后重试"))
{
}
if (!jsonStr.Contains("\"success\":true"))
if (!jsonRst.Contains("\"success\":true"))
{
//isError = true;
//string sErr = BaseRegex.GetStringJson(ref jsonStr, "errorMsg");
//string sErr = BaseRegex.GetStringJson(ref jsonRst, "errorMsg");
//if (!string.IsNullOrWhiteSpace(sErr) && !errMsg.Contains(sErr))
// errMsg += sErr + " ";
//page++;
string sErr = BaseRegex.GetStringJson(ref jsonStr, "errorMsg");
string sErr = BaseRegex.GetStringJson(ref jsonRst, "errorMsg");
if (string.IsNullOrEmpty(sErr))
sErr = BaseRegex.GetStringJson(ref jsonStr, "err_msg");
sErr = BaseRegex.GetStringJson(ref jsonRst, "err_msg");
if (string.IsNullOrEmpty(sErr))
sErr = jsonStr;
sErr = jsonRst;
Invoke(new Action(() =>
{
actRow.Cells["colActivityMsg"].Value = sErr;
@@ -563,12 +554,12 @@ namespace TemuKJD.KJDForms.SalesCenterForms
continue;
}
if (jsonStr.Contains("\"success\":true"))
if (jsonRst.Contains("\"success\":true"))
{
var jArr = new JArray();
try
{
var jObj = JObject.Parse(jsonStr);
var jObj = JObject.Parse(jsonRst);
jArr = jObj["result"]?["matchList"] as JArray;
if (jArr == null)
jArr = new JArray();
@@ -590,10 +581,10 @@ namespace TemuKJD.KJDForms.SalesCenterForms
var suggestActivityPrice = skuObj["suggestActivityPrice"].ParseToInt();
var dailyPrice = skuObj["dailyPrice"].ParseToInt();
var discount = suggestActivityPrice * 100.0 / dailyPrice;
actInfo.discount = Math.Round(discount) + "折";
actInfo.discount = Math.Round(discount) + "";
Invoke(new Action(() =>
{
actRow.Cells["colDiscount"].Value = actInfo.discount;
actRow.Cells["colDiscount"].Value = string.IsNullOrEmpty(actInfo.discount) ? "-" : actInfo.discount.TrimEnd('0') + "折";
actRow.Cells["colActivityMsg"].Value = "折扣查询成功";
shopRow.Cells["colMessage"].Value = "";
}));
@@ -602,7 +593,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms
catch (Exception ex) { BaseMsgForm.ShowError(ex.Message); }
}
}
if(string.IsNullOrEmpty(actInfo.discount) || !actInfo.discount.Contains("折"))
if(string.IsNullOrEmpty(actInfo.discount))
{
this.Invoke(new Action(() =>
{
@@ -612,6 +603,186 @@ namespace TemuKJD.KJDForms.SalesCenterForms
}
}
int GetNearDiscount(int discount)
{
if (lstDiscount.Count <= 0)
return 100;
if (discount < lstDiscount.First())
return lstDiscount.First();
if (discount >= lstDiscount.Last())
return lstDiscount.Last();
for (int i = 0; i < lstDiscount.Count - 2; i++)
{
if (discount >= lstDiscount[i] && discount < lstDiscount[i + 1])
return lstDiscount[i];
}
return lstDiscount.Last();
}
private void btnSignActivity_Click(object sender, EventArgs e)
{
var lstShopId = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
if (lstShopId.Count == 0)
{
BaseMsgForm.ShowInfo("请选择店铺!");
return;
}
var lstActivityId = dgvActivity.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colCheckActivity"]?.Value.ParseToBool() == true).Select(r => r.Cells["colActivityId"]?.Value.ToString()).ToList();
if (lstActivityId.Count == 0)
{
BaseMsgForm.ShowInfo("请选择活动!");
return;
}
#region 重置控件数据
dgvProduct.Rows.Clear();
var shopRows = this.dgvShop.Rows.Cast<DataGridViewRow>();
foreach (var r in shopRows)
{
r.Cells["colMessage"].Value = "";
}
ucGroupBoxEx2.Enabled = false;
ucGroupBoxEx3.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
lstShopIdSelect.Clear();
lstShopIdSelect.AddRange(lstShopId);
#endregion
Task.Run(() =>
{
if (chkNoSaleProd.Checked)
GetNoSaleProd();
SignActivity();
Invoke(new Action(() =>
{
ucGroupBoxEx2.Enabled = true;
ucGroupBoxEx3.Enabled = true;
string sRst = "查询结束!";
if (cancellationTokenSource.IsCancellationRequested)
sRst = "已取消查询!";
BaseMsgForm.ShowInfo(sRst);
this.statusBar.lblTaskStatus.Text = sRst;
}));
},cancellationTokenSource.Token);
}
public void GetNoSaleProd()
{
int i = 0;
foreach (var shopId in lstShopIdSelect)
{
this.Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在查询无销量商品...";
this.statusBar.pgbTaskProgress.Maximum = lstShopIdSelect.Count;
this.statusBar.UpdateProgressBar(i + 1);
i++;
}));
if (cancellationTokenSource.IsCancellationRequested)
break;
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId);
if (shop == null)
continue;
var shopRow = this.dgvShop.Rows.Cast<DataGridViewRow>()
.FirstOrDefault(r => r.Cells["colShopId"].Value.ParseToString() == shop.ShopId);
if (shopRow == null)
continue;
if (!CheckLogin(shop))
continue;
this.dicNoSaleProd[shop.ShopId] = new List<SubOrderInfo>();
int page = 0;
int totalPage = 1;
while (page < totalPage)
{
page++;
string jsonRst = GetNoSaleProd(shop, numNoSaleDays.Value.ParseToInt(), page);
if (!jsonRst.Contains("\"success\":true"))
{
string sErr = BaseRegex.GetStringJson(ref jsonRst, "errorMsg");
if (string.IsNullOrEmpty(sErr))
sErr = BaseRegex.GetStringJson(ref jsonRst, "err_msg");
if (string.IsNullOrEmpty(sErr))
sErr = jsonRst;
Invoke(new Action(() =>
{
shopRow.Cells["colMessage"].Value = sErr;
}));
break;
}
var jArr = new JArray();
try
{
var jObj = JObject.Parse(jsonRst);
jArr = jObj["result"]["subOrderList"] as JArray;
if (jArr == null)
jArr = new JArray();
foreach (var item in jArr)
{
string sItem = item.ToString();
SubOrderInfo sInfo = JsonHelper.DeserializeJsonToObject<SubOrderInfo>(sItem); // 反序列化得到类
if (sInfo != null)
{
this.dicNoSaleProd[shop.ShopId].Add(sInfo);
}
}
}
catch (Exception ex)
{
BaseMsgForm.ShowError(ex.Message);
}
int total = BaseRegex.GetStringJson(ref jsonRst, "total").ParseToInt();
totalPage = Math.Ceiling(total / 40.0).ParseToInt();
}
}
}
public void SignActivity()
{
foreach (var shopId in lstShopIdSelect)
{
}
}
public bool CheckLogin(ShopLoginInfo shop)
{
if (shop.LoginStatus2 != "国际版在线")
{
return false;
}
if (ShopListForm.Instance == null) ShopListForm.Instance = new ShopListForm();
ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false);
if (shop.LoginStatus2 != "国际版在线")
{
Invoke(new Action(() =>
{
var rows = this.dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colShopLoginName"].Value.ToString() == shop.LoginName);
foreach (var row in rows)
{
row.Cells["colMessage"].Value = "店铺掉线";
row.Cells["colLoginStatus"].Value = "国际版未登录";
row.Cells["colCanUse"].Value = false;
}
}));
return false;
}
return true;
}
/// <summary>
/// 获取活动列表
/// </summary>
@@ -639,5 +810,22 @@ namespace TemuKJD.KJDForms.SalesCenterForms
string refere = "https://agentseller.temu.com/activity/marketing-activity/detail-new?type=13&thematicId=" + thematicId;
return KJDHttpResponse.PostResponse2(shop, url, body, refere);
}
/// <summary>
///
/// </summary>
/// <param name="shop"></param>
/// <param name="onSalesDays">加入站点天数</param>
/// <param name="page"></param>
/// <returns></returns>
private string GetNoSaleProd(ShopLoginInfo shop, int onSalesDays, int page=1)
{
string url = "https://agentseller.temu.com/mms/venom/api/supplier/sales/management/listWarehouse";
string body;
body = @"{""pageNo"":" + page + @",""pageSize"":40,""isLack"":0,""selectStatusList"":[12],""priceAdjustRecentDays"":7,
""thirtyDaysSaleVolumMax"":0,""onSalesDurationOfflineGte"":" + onSalesDays + "}";
string refere = "https://agentseller.temu.com/stock/fully-mgt/sale-manage/main";
return KJDHttpResponse.PostResponse2(shop, url, body, refere);
}
}
}
@@ -0,0 +1,96 @@
namespace TemuKJD.KJDForms.SalesCenterForms
{
partial class UcActivityDiscountCtrl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.numInventory = new System.Windows.Forms.NumericUpDown();
this.chkDefaultInventory = new TemuKJD.UserComponent.UcCheckBox(this.components);
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.numInventory)).BeginInit();
this.SuspendLayout();
//
// numInventory
//
this.numInventory.Location = new System.Drawing.Point(127, 0);
this.numInventory.Margin = new System.Windows.Forms.Padding(0);
this.numInventory.Name = "numInventory";
this.numInventory.Size = new System.Drawing.Size(65, 21);
this.numInventory.TabIndex = 707;
this.numInventory.Value = new decimal(new int[] {
10,
0,
0,
0});
this.numInventory.ValueChanged += new System.EventHandler(this.numInventory_ValueChanged);
//
// chkDiscount6
//
this.chkDefaultInventory.AutoSize = true;
this.chkDefaultInventory.Location = new System.Drawing.Point(198, 2);
this.chkDefaultInventory.Margin = new System.Windows.Forms.Padding(0);
this.chkDefaultInventory.Name = "chkDiscount6";
this.chkDefaultInventory.Size = new System.Drawing.Size(48, 16);
this.chkDefaultInventory.TabIndex = 706;
this.chkDefaultInventory.Text = "默认";
this.chkDefaultInventory.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(0, 4);
this.label1.Margin = new System.Windows.Forms.Padding(0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(125, 12);
this.label1.TabIndex = 705;
this.label1.Text = "设置 6折报名活动库存";
//
// UcActivityDiscountCtrl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.Controls.Add(this.numInventory);
this.Controls.Add(this.chkDefaultInventory);
this.Controls.Add(this.label1);
this.Name = "UcActivityDiscountCtrl";
this.Size = new System.Drawing.Size(246, 21);
((System.ComponentModel.ISupportInitialize)(this.numInventory)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.NumericUpDown numInventory;
private UserComponent.UcCheckBox chkDefaultInventory;
private System.Windows.Forms.Label label1;
}
}
@@ -0,0 +1,93 @@
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TemuKJD.KJDForms.SalesCenterForms
{
public partial class UcActivityDiscountCtrl : UserControl
{
public UcActivityDiscountCtrl()
{
InitializeComponent();
this.Load += UcActivityDiscountCtrl_Load;
}
private void UcActivityDiscountCtrl_Load(object sender, EventArgs e)
{
this.label1.Text = "设置" + discount.ToString().Trim('0').PadLeft(2, ' ') + "折报名活动库存";
}
private int discount = 90;
/// <summary>
/// 折扣数值
/// </summary>
[Description("折扣数值"), Category("UserProperty")]
public int Discount
{
get
{
return discount;
}
set
{
if (discount != value)
{
discount = value;
this.label1.Text = "设置" + discount.ToString().Trim('0').PadLeft(2, ' ') + "折报名活动库存";
this.Invalidate();
}
}
}
private int inventory = 10;
/// <summary>
/// 活动库存
/// </summary>
[Description("活动库存"), Category("UserProperty")]
public int Inventory
{
get
{
return inventory;
}
set
{
if (inventory != value)
{
inventory = value;
this.numInventory.Value = inventory;
this.Invalidate();
}
}
}
[Description("默认库存"), Category("UserProperty")]
public bool IsDefaultInventory
{
get
{
return this.chkDefaultInventory.Checked;
}
set
{
if (this.chkDefaultInventory.Checked != value)
{
this.chkDefaultInventory.Checked = value;
this.Invalidate();
}
}
}
private void numInventory_ValueChanged(object sender, EventArgs e)
{
this.inventory = numInventory.Value.ParseToInt();
}
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
-1
View File
@@ -219,7 +219,6 @@ namespace TemuKJD.UserControls
//
// UcSplitPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.flowLayoutPanel2);
this.Controls.Add(this.flowLayoutPanel1);