private void simpleButton4_Click_1(object sender, EventArgs e) { DataTable dt = SizeService.StyleValue(this.chicun01.Text.Trim().ToString(), uc.kuanshiid, Frm定制下单修改尺寸.stylesizedt); ImpService.RefreshChiCun(this, dt); ImpService.CountChiCun(this); }
private void Index_Load(object sender, EventArgs e) { this.splashScreenManager.ShowWaitForm(); this.splashScreenManager.SetWaitFormCaption("请稍后,正在加载中...."); // 标题 this.splashScreenManager.SetWaitFormDescription("正在初始化....."); // 信息 //款式图片更新 StylePicList spl = new StylePicList(); List <StylePic> styleOldlist = DealXML.XMLFlieToObject <List <StylePic> >(@"xml\stylepicxml.xml", Encoding.UTF8); List <StylePic> styleDifflist = ImpService.listCompare(spl.stylepiclist, styleOldlist); ImpService.DownloadDifferentPic(styleDifflist); bool yn = DealXML.ObjectToXMLFile(spl.stylepiclist, @"xml\stylepicxml.xml", Encoding.UTF8); //面料图片更新 MianLiaoPicList mlpl = new MianLiaoPicList(); //bool mlyn = DealXML.ObjectToXMLFile(mlpl.mianliaopiclist, @"mlpicxml.xml", Encoding.UTF8); List <MianLiaoPic> mianliaoOldlist = DealXML.XMLFlieToObject <List <MianLiaoPic> >(@"xml\mlpicxml.xml", Encoding.UTF8); List <MianLiaoPic> mianliaoDifflist = ImpService.mianliaolistCompare(mlpl.mianliaopiclist, mianliaoOldlist); ImpService.DownloadMianliaoPic(mianliaoDifflist); bool mlyn = DealXML.ObjectToXMLFile(mlpl.mianliaopiclist, @"xml\mlpicxml.xml", Encoding.UTF8); //设计点图片更新 SheJiDianPicList sjdpl = new SheJiDianPicList(); //bool shjdyn = DealXML.ObjectToXMLFile(sjdpl.shejidianpiclist, @"xml\shjdpicxml.xml", Encoding.UTF8); List <SheJiDianPic> shejidianOldlist = DealXML.XMLFlieToObject <List <SheJiDianPic> >(@"xml\shjdpicxml.xml", Encoding.UTF8); List <SheJiDianPic> shejidianDifflist = ImpService.shejidianlistCompare(sjdpl.shejidianpiclist, shejidianOldlist); ImpService.DownloadSheJiDianPic(shejidianDifflist); bool shjdyn = DealXML.ObjectToXMLFile(sjdpl.shejidianpiclist, @"xml\shjdpicxml.xml", Encoding.UTF8); this.splashScreenManager.CloseWaitForm(); //String viewDtostrToken = RestCall.httpGetMethod("http://192.168.1.7:5090/bill/generalView?tokenTemplateId=" + "dingdan" + "&pageSize=" + "500" + "&pageNo=" + "1"); //Result previewResult = Newtonsoft.Json.JsonConvert.DeserializeObject<Result>(viewDtostrToken); //PreviewDTO previewDTO = Newtonsoft.Json.JsonConvert.DeserializeObject<PreviewDTO>(previewResult.data.ToString()); //List<ReducedFkeyField> ssstyle = new List<ReducedFkeyField>(); //List<string> style = new List<string>(); //foreach (ReducedTokenDataDto sstyle in previewDTO.datas.tokenDataDtoList) //{ // //dingDanDTO.Add(new DingDanDTO { TokenId = sstyle.tokenId }); // ssstyle.AddRange(sstyle.fields); // foreach (ReducedFkeyField sssstyle in ssstyle) // { // if (sssstyle.key == "mingcheng") // { // jsData = sssstyle.jsonData; // //style.Add(sssstyle.jsonData); // } // } // dingDanDTO.Add(new DingDanDTO { TokenId = sstyle.tokenId, Mingcheng = jsData }); //} ////foreach (ReducedFkeyField sssstyle in ssstyle) ////{ //// if(sssstyle.key=="mingcheng") //// { //// style.Add(sssstyle.jsonData); //// } ////} this.gridView1.GroupPanelText = "订单一览"; RefreshGridcontrol(); }
/// <summary> /// 上一页 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void shangye_Button(object sender, EventArgs e) { if (Index.page == 1) { MessageBox.Show("已经到首页"); return; } this.splashScreenManager.ShowWaitForm(); this.splashScreenManager.SetWaitFormCaption("请稍后,正在加载中...."); // 标题 this.splashScreenManager.SetWaitFormDescription("正在初始化....."); // 信息 Index.page--; this.panel1.Controls.Clear(); height = 0; width = 0; int i = 0; DataTable dt = ImpService.initStyle(this.textBox1.Text, Index.page); //if (dt.Rows.Count == 0) //{ // MessageBox.Show("已经是最后一页"); // ImpService.page--; // dt = ImpService.initStyle(this.textBox1.Text, ImpService.page); //} panelLocition = new PanelLocition(this.panel1.Width, this.panel1.Height, dt.Rows.Count); foreach (DataRow dr in dt.Rows) { StyleCard sc = new StyleCard(); sc.stylecardlabel.Text = dr["styleEntity.styleNameCn"].ToString(); sc.kuanshiid = dr["styleId"].ToString(); sc.kuanshimingcheng = dr["styleEntity.styleNameCn"].ToString(); sc.mianliaoid = dr["materialEntity.id"].ToString(); sc.mianliaomingcheng = dr["materialEntity.materialNameCn"].ToString(); sc.sTYLE_CATEGORY_CD = dr["styleEntity.styleCategoryCd"].ToString(); sc.sTYLE_FIT_CD = dr["styleEntity.styleFitCd"].ToString(); sc.sTYLE_SIZE_GROUP_CD = dr["styleEntity.styleSizeGroupCd"].ToString(); sc.sTYLE_DRESS_CATEGORY = dr["styleEntity.styleDressCategory"].ToString(); sc.sTYLE_DESIGN_TYPE = dr["styleEntity.styleDesignType"].ToString(); sc.sTYLE_PUBLISH_CATEGORY_CD = dr["styleEntity.stylePublishCategoryCd"].ToString(); sc.sYTLE_YEAR = dr["styleEntity.sytleYear"].ToString(); sc.sYTLE_SEASON = dr["styleEntity.sytleSeason"].ToString(); //sc.id = cd.id; //sc.banid = cd.banid; //sc.jiage = cd.jiage; sc.picture = @"pic\" + dr["picn"].ToString(); this.generateUserControl(sc, i); this.panel1.Controls.Add(sc);//将控件加入panel try { sc.stylecardpicbox.Image = Image.FromFile(sc.picture); } catch { } i++; } this.fenYeLan1.label1.Text = Index.page.ToString(); this.splashScreenManager.CloseWaitForm(); }
private void jian_TextChanged(object sender, EventArgs e) { try { ImpService.CountChiCun(this.frm); } catch { ImpService.CountChiCun(change); } }
/// <summary> /// 修改尺寸将空尺寸设为0 /// </summary> /// <param name="form"></param> //public static void TurnChiCunZero(ReviseStyle form) //{ //foreach (Control card in form.panel4.Controls) //{ // if (card is ChiCunCard) // { // ChiCunCard c = (ChiCunCard)card; // if (c.biaozhun.Text == "") // { // c.biaozhun.Text = "0"; // } // if (c.jia.Text == "") // { // c.jia.Text = "0"; // } // if (c.jian.Text == "") // { // c.jian.Text = "0"; // } // } //} //} /// <summary> /// 计算成衣尺寸 /// </summary> /// <param name="change"></param> public static void CountChiCun(Frm定制下单修改尺寸 change) { ImpService.TurnChiCunZero(change); foreach (Control card in change.panel4.Controls) { if (card is UC尺寸卡片) { UC尺寸卡片 c = (UC尺寸卡片)card; c.chengyi.Text = (Convert.ToDouble(c.biaozhun.Text) + Convert.ToDouble(c.jia.Text) - Convert.ToDouble(c.jian.Text)).ToString(); } } }
/// <summary> /// 显示所有 /// </summary> private void DoButtonClick() { this.splashScreenManager.ShowWaitForm(); this.splashScreenManager.SetWaitFormCaption("请稍后,正在加载中...."); // 标题 this.splashScreenManager.SetWaitFormDescription("正在初始化....."); // 信息 MianLiaochoose.page = 1; DataTable dt = ImpService.GetMianLiao(this.textBox1.Text, MianLiaochoose.page); this.panel1.Controls.Clear(); height = 0; width = 0; int i = 0; panelLocition = new PanelLocition(this.panel1.Width, this.panel1.Height, dt.Rows.Count); foreach (DataRow dr in dt.Rows) { MianLiaoCard oc = new MianLiaoCard(this); //oc.label1.Text = ImpService.SqritBySymbol(dr["mianliao"].ToString(), 14, "\n"); oc.label1.Text = dr["mianliao"].ToString(); oc.mianliao = dr["mianliao"].ToString(); oc.mianliaoid = dr["id"].ToString(); oc.mianliaocd = dr["materialCode"].ToString(); oc.picurl = dr["picurl"].ToString(); try { //string url = string.Format(@cd.picture, 5, 123456); //string url = string.Format(@"https://sshirtmtmbucket.oss-cn-zhangjiakou.aliyuncs.com/sshirtmtm/ZSF-1-320.jpg?size={0}&content={1}", 5, 123456); /* * System.Net.WebRequest webreq = System.Net.WebRequest.Create(oc.picurl); * System.Net.WebResponse webres = webreq.GetResponse(); * using (System.IO.Stream stream = webres.GetResponseStream()) * { * oc.pictureBox1.Image = Image.FromStream(stream); * }*/ oc.pictureBox1.Image = Image.FromFile(@"pic\" + dr["picn"].ToString().Trim()); } catch { } this.generateUserControl(oc, i); this.panel1.Controls.Add(oc);//将控件加入panel //oc.pictureBox1.Click += new EventHandler(this.picture_Click); i++; } this.splashScreenManager.CloseWaitForm(); }
private void Change_Load(object sender, EventArgs e) { this.jisuan.Parent = null; //this.tabPage2.Parent = null; //this.tabPage1.Parent = null; ImpService.LoadChiCunCard(this, uc); ImpService.LoadSheJiDian(this, uc.kuanshiid); stylesizedt = StyleService.StyleCombobox(uc.kuanshiid); if (stylesizedt != null) { foreach (DataRow dr in stylesizedt.Rows) { //this.chicun.Items.Add(Convert.ToString(dr["尺寸"])); this.chicun01.Items.Add(Convert.ToString(dr["尺寸"])); } } }
/// <summary> /// 下一页 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void xiaye_Button(object sender, EventArgs e) { this.splashScreenManager.ShowWaitForm(); this.splashScreenManager.SetWaitFormCaption("请稍后,正在加载中...."); // 标题 this.splashScreenManager.SetWaitFormDescription("正在初始化....."); // 信息 MianLiaochoose.page++; DataTable dt = ImpService.GetMianLiao(this.textBox1.Text, MianLiaochoose.page); if (dt.Rows.Count == 0) { MessageBox.Show("已经是最后一页"); MianLiaochoose.page--; dt = ImpService.GetMianLiao(this.textBox1.Text, MianLiaochoose.page); } this.panel1.Controls.Clear(); height = 0; width = 0; int i = 0; panelLocition = new PanelLocition(this.panel1.Width, this.panel1.Height, dt.Rows.Count); foreach (DataRow dr in dt.Rows) { MianLiaoCard oc = new MianLiaoCard(this); oc.label1.Text = dr["mianliao"].ToString(); oc.mianliao = dr["mianliao"].ToString(); oc.mianliaoid = dr["id"].ToString(); oc.mianliaocd = dr["materialCode"].ToString(); oc.picurl = dr["picurl"].ToString(); try { oc.pictureBox1.Image = Image.FromFile(@"pic\" + dr["picn"].ToString().Trim()); } catch { } this.generateUserControl(oc, i); this.panel1.Controls.Add(oc);//将控件加入panel //oc.pictureBox1.Click += new EventHandler(this.picture_Click); i++; } this.fenYeLan1.label1.Text = MianLiaochoose.page.ToString(); this.splashScreenManager.CloseWaitForm(); }
private void pictureBox1_Click(object sender, EventArgs e) { //if(CreateCustomer.cUSTOMER_ID==0) //{ // MessageBox.Show("请先选择客户"); // return; //} //if(this.flag== "标准款下单具体") //{ // new Frm标准款下单具体(this).ShowDialog(); //} //else if(this.flag=="Change") //{ // new Change(this).ShowDialog(); //} //else if(this.flag=="门店下单选款式") //{ this.frm.model.Dto定制下单.Style_Id = this.kuanshiid; this.frm.model.Dto定制下单.STYLE_CATEGORY_CD = this.sTYLE_CATEGORY_CD; this.frm.model.Dto定制下单.STYLE_FIT_CD = this.sTYLE_FIT_CD; this.frm.model.Dto定制下单.STYLE_SIZE_GROUP_CD = this.sTYLE_SIZE_GROUP_CD; //this.frm.model.Dto定制下单.STYLE_SIZE_CD = this.sTYLE_SIZE_CD; this.frm.model.Dto定制下单.SYTLE_FABRIC_ID = this.mianliaoid; this.frm.mianliaoname.Text = this.mianliaomingcheng; ImpService.LoadChiCunCard(this.frm); ImpService.LoadSheJiDian(this.frm, this.frm.model.Dto定制下单.Style_Id); Frm定制下单修改尺寸.stylesizedt = StyleService.StyleCombobox(this.frm.model.Dto定制下单.Style_Id); if (Frm定制下单修改尺寸.stylesizedt != null) { foreach (DataRow dr in Frm定制下单修改尺寸.stylesizedt.Rows) { //this.chicun.Items.Add(Convert.ToString(dr["尺寸"])); this.frm.chicun01.Items.Add(Convert.ToString(dr["尺寸"])); } } this.frm.addPics(); this.frm.xtraTabControl1.SelectedTabPage = this.frm.xtraTabControl1.TabPages[1]; //} }
/// <summary> /// 动态保存尺寸 /// </summary> /// <param name="change"></param> public static void DynamicSaveSize(Frm定制下单修改尺寸 change, int sTYLE_FIT_ID, String customername) { ImpService.TurnChiCunZero(change); Fit_ValueDTo fitv = new Fit_ValueDTo(); foreach (Control card in change.panel4.Controls) { if (card is UC尺寸卡片) { UC尺寸卡片 c = (UC尺寸卡片)card; fitv.icadd(c.iTEM_CD); fitv.ivadd(c.iTEM_VALUE); fitv.fvadd(c.chengyi.Text); fitv.fmvadd(c.iTEM_VALUE); fitv.invadd(c.jia.Text); fitv.outvadd(c.jian.Text); } } SQLmtm.DoInsert("a_customer_fit_value_r", new string[] { "STYLE_FIT_ID", "CUSTOMER_ID", "CUSTOMER_NAME", "ITEM_CD", "ITEM_VALUE", "FIT_VALUE", "FM_VALUE", "IN_VALUE", "OUT_VALUE", "STATUS", "DELETE_FLAG", "CUSTOMER_COUNT_ID" }, new string[] { sTYLE_FIT_ID.ToString(), Frm客户.cUSTOMER_ID.ToString(), customername, fitv.iTEM_CD, fitv.iTEM_VALUE, fitv.fitValue, fitv.fM_VALUE, fitv.iN_VALUE, fitv.oUT_VALUE, "0", "0", Frm客户.customer_countid.ToString() }); SQLmtm.DoInsert("s_style_fit_r", new string[] { "STYLE_ID", "PHASE_CD", "ITEM_CD", "ITEM_VALUE", "FIT_VALUE", "FM_VALUE", "DELETE_FLAG", "VERSION", "CREATE_USER", "IN_VALUE", "OUT_VALUE" }, new string[] { Frm定制下单修改尺寸.styleid.ToString(), "AUDIT_PHASE_CD-PHASE_CD_10", fitv.iTEM_CD, fitv.iTEM_VALUE, fitv.fitValue, fitv.fM_VALUE, "0", "1", "46", fitv.iN_VALUE, fitv.oUT_VALUE }); }
/// <summary> /// 动态设计点保存 /// </summary> /// <param name="frm"></param> /// <param name="dto"></param> public static void DynamicSaveSize(Frm门店下单选款式 frm, Dto定制下单 dto) { ImpService.TurnChiCunZero(frm); Fit_ValueDTo fitv = new Fit_ValueDTo(); foreach (Control card in frm.panel4.Controls) { if (card is UC尺寸卡片) { UC尺寸卡片 c = (UC尺寸卡片)card; fitv.icadd(c.iTEM_CD); //ITEM_CD 衣服CD fitv.ivadd(c.iTEM_VALUE); //ITEM_VALUE 衣服VALUE fitv.fvadd(c.chengyi.Text); // garmentSize 成衣尺寸 fitv.fmvadd(c.iTEM_VALUE); //ITEM_VALUE 衣服VALUE fitv.invadd(c.jia.Text); //IN_VALUE 加值 fitv.outvadd(c.jian.Text); //OUT_VALUE 减值 } } dto.build尺寸( fitv.iTEM_CD , fitv.iTEM_VALUE , fitv.fitValue , fitv.fM_VALUE , fitv.iN_VALUE , fitv.oUT_VALUE , "0" , "0" , Frm客户.customer_countid.ToString() , "AUDIT_PHASE_CD-PHASE_CD_10" , "1" , "46" ); // SQLmtm.DoInsert("a_customer_fit_value_r", new string[] { "STYLE_FIT_ID", "CUSTOMER_ID", "CUSTOMER_NAME", "ITEM_CD", "ITEM_VALUE", "FIT_VALUE", "FM_VALUE", "IN_VALUE", "OUT_VALUE", "STATUS", "DELETE_FLAG", "CUSTOMER_COUNT_ID" }, new string[] { sTYLE_FIT_ID.ToString(), CreateCustomer.cUSTOMER_ID.ToString(), customername, fitv.iTEM_CD, fitv.iTEM_VALUE, fitv.fitValue, fitv.fM_VALUE, fitv.iN_VALUE, fitv.oUT_VALUE, "0", "0", CreateCustomer.customer_countid.ToString() }); // SQLmtm.DoInsert("s_style_fit_r", new string[] { "STYLE_ID", "PHASE_CD", "ITEM_CD", "ITEM_VALUE", "FIT_VALUE", "FM_VALUE", "DELETE_FLAG", "VERSION", "CREATE_USER", "IN_VALUE", "OUT_VALUE" }, //new string[] { Change.styleid.ToString(), "AUDIT_PHASE_CD-PHASE_CD_10", fitv.iTEM_CD, fitv.iTEM_VALUE, fitv.fitValue, fitv.fM_VALUE, "0", "1", "46", fitv.iN_VALUE, fitv.oUT_VALUE }); }
private void simpleButton1_Click(object sender, EventArgs e) { this.splashScreenManager.ShowWaitForm(); this.splashScreenManager.SetWaitFormCaption("请稍后,正在加载中...."); // 标题 this.splashScreenManager.SetWaitFormDescription("正在初始化....."); // 信息 Index.page = 1; /* * Style stylee = new Style(); * // 模糊查询,返回匹配的款式名 * List<Card> styleReturn * = this.onFindKeyWord( * textBox1.Text * //, new Style().Styles // 款式名 * , stylee.Card // 款式名 * * );*/ // 布局方法 this.panel1.Controls.Clear(); height = 0; width = 0; int i = 0; DataTable dt = ImpService.initStyle(this.textBox1.Text, Index.page); panelLocition = new PanelLocition(this.panel1.Width, this.panel1.Height, dt.Rows.Count); foreach (DataRow dr in dt.Rows) { StyleCard sc = new StyleCard(); sc.stylecardlabel.Text = dr["styleEntity.styleNameCn"].ToString(); sc.kuanshiid = dr["styleId"].ToString(); sc.kuanshimingcheng = dr["styleEntity.styleNameCn"].ToString(); sc.mianliaoid = dr["materialEntity.id"].ToString(); sc.mianliaomingcheng = dr["materialEntity.materialNameCn"].ToString(); sc.sTYLE_CATEGORY_CD = dr["styleEntity.styleCategoryCd"].ToString(); sc.sTYLE_FIT_CD = dr["styleEntity.styleFitCd"].ToString(); sc.sTYLE_SIZE_GROUP_CD = dr["styleEntity.styleSizeGroupCd"].ToString(); sc.sTYLE_DRESS_CATEGORY = dr["styleEntity.styleDressCategory"].ToString(); sc.sTYLE_DESIGN_TYPE = dr["styleEntity.styleDesignType"].ToString(); sc.sTYLE_PUBLISH_CATEGORY_CD = dr["styleEntity.stylePublishCategoryCd"].ToString(); sc.sYTLE_YEAR = dr["styleEntity.sytleYear"].ToString(); sc.sYTLE_SEASON = dr["styleEntity.sytleSeason"].ToString(); //sc.id = cd.id; //sc.banid = cd.banid; //sc.jiage = cd.jiage; sc.picture = @"pic\" + dr["picn"].ToString(); this.generateUserControl(sc, i); this.panel1.Controls.Add(sc);//将控件加入panel try { //string url = string.Format(@cd.picture, 5, 123456); //string url = string.Format(@"https://sshirtmtmbucket.oss-cn-zhangjiakou.aliyuncs.com/sshirtmtm/ZSF-1-320.jpg?size={0}&content={1}", 5, 123456); /* * System.Net.WebRequest webreq = System.Net.WebRequest.Create(sc.picture); * System.Net.WebResponse webres = webreq.GetResponse(); * * using (System.IO.Stream stream = webres.GetResponseStream()) * { * sc.stylecardpicbox.Image = Image.FromStream(stream); * } */ sc.stylecardpicbox.Image = Image.FromFile(sc.picture); } catch { } i++; this.fenYeLan1.label1.Text = Index.page.ToString(); } this.splashScreenManager.CloseWaitForm(); //foreach (Card cd in styleReturn) //{ // StyleCard sc=new StyleCard(); // sc.stylecardlabel.Text = cd.kuanshiid+cd.kuanshiming+"\n面料:"+cd.mianliaoid; // sc.kuanshiid = cd.kuanshiid; // sc.kuanshimingcheng = cd.kuanshiming; // sc.mianliaoid = cd.mianliaoid; // sc.mianliaomingcheng = cd.mianliaomingcheng; // sc.id = cd.id; // sc.banid = cd.banid; // sc.jiage = cd.jiage; // sc.picture = cd.picture; // this.generateUserControl(sc, i); // this.panel1.Controls.Add(sc);//将控件加入panel // try // { // //string url = string.Format(@cd.picture, 5, 123456); // //string url = string.Format(@"https://sshirtmtmbucket.oss-cn-zhangjiakou.aliyuncs.com/sshirtmtm/ZSF-1-320.jpg?size={0}&content={1}", 5, 123456); // System.Net.WebRequest webreq = System.Net.WebRequest.Create(cd.picture); // System.Net.WebResponse webres = webreq.GetResponse(); // using (System.IO.Stream stream = webres.GetResponseStream()) // { // sc.stylecardpicbox.Image = Image.FromStream(stream); // } // } // catch // { // } // i++; //} }
/// <summary> /// 订单信息保存 /// </summary> private void stylechangesave_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show("确认保存吗?", "保存", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialogResult == DialogResult.Yes) { if (Frm面料选择.mianliaoid == "" || this.chicun01.Text == "" || this.shuliang.Text == "") { MessageBox.Show("请填写完整"); return; } DataRow drstylefit = SQLmtm.GetDataRow("SELECT MAX(STYLE_FIT_ID) as STYLE_FIT_ID FROM `a_customer_fit_value_r`"); int sTYLE_FIT_ID = Convert.ToInt32(drstylefit["STYLE_FIT_ID"]); sTYLE_FIT_ID++; DataRow drcustomer = SQLmtm.GetDataRow("select * from a_customer_p where CUSTOMER_ID='" + Frm客户.cUSTOMER_ID.ToString() + "'"); string customername = Convert.ToString(drcustomer["CUSTOMER_FIRST_NAME"]) + Convert.ToString(drcustomer["CUSTOMER_LAST_NAME"]); sTYLE_SIZE_CD = SizeService.SizeCD(this.chicun01.Text.Trim(), stylesizedt); DataRow drstyle = SQLmtm.GetDataRow("SELECT MAX(SYS_STYLE_ID) SYS_STYLE_ID FROM `s_style_p`"); styleid = Convert.ToInt32(drstyle["SYS_STYLE_ID"]); styleid++; //a_customer_fit_value_r,s_style_fit_r表存储 //ImpService.insertFit_R(sTYLE_FIT_ID, customername, fitv, ftvl, inftvl, outftvl); //动态尺寸保存 ImpService.DynamicSaveSize(this, sTYLE_FIT_ID, customername); //s_style_p储存 ImpService.insertS_Style_P(this, uc); //s_style_fit_r //设计点保存 //ImpService.SaveDesign(this); ImpService.DynamicSaveDesign(this); //o_order_p //RestCall.httpGetMethod("https://shirtmtm.com/fragsmart-mtm/customer/update/payment?styleId=" + styleid.ToString() + "&customerId=" + CreateCustomer.cUSTOMER_ID.ToString() + "&addressId=" + CreateCustomer.aDDRESS_ID.ToString() + "&number=" + this.shuliang.Text); RestCall.httpGetMethod("http://localhost:8080/customer/update/payment?styleId=" + styleid.ToString() + "&customerId=" + Frm客户.cUSTOMER_ID.ToString() + "&addressId=" + Frm客户.aDDRESS_ID.ToString() + "&number=" + this.shuliang.Text); DataRow ORDER_ID = SQLmtm.GetDataRow("SELECT MAX(ORDER_ID) AS ORDER_ID FROM `o_order_p`"); int order_id = Convert.ToInt32(ORDER_ID["ORDER_ID"]); //order_id++; SQLmtm.DoInsert("o_order_brand_r", new string[] { "OGNIZATION_ID", "SHOP_ID", "BRAND_ID", "ORDER_ID" }, new string[] { "95", "18", "", order_id.ToString() }); SQLmtm.DoInsert("t_order_type", new string[] { "ORDER_ID", "ORDER_TYPE" }, new string[] { order_id.ToString(), "1" }); if (Convert.ToInt32(this.shuliang.Text) == Convert.ToInt32(this.shuliang.Text)) { MessageBox.Show("保存成功!"); //this.closeForm(); this.Close(); } else { MessageBox.Show("保存失败"); } } //else //{ // MessageBox.Show("请填写完整"); // //return; //} else { return; } }
private void jisuan_Click(object sender, EventArgs e) { ImpService.CountChiCun(this); }
private void simpleButton1_Click(object sender, EventArgs e) { if (this.shengao.Text == "" || this.tizhong.Text == "" || this.xiongwei.Text == "" || this.tixing.Text == "" || this.jianxing.Text == "" || this.fuxing.Text == "" || this.beixing.Text == "") { MessageBox.Show("请填写完整"); return; } ImpService.customerZero(this); customer_name = this.xing.Text + this.ming.Text; if (this.sex.Text == "男") { sEX_CD = "SEX-M_10"; sexno = "0"; } else { sEX_CD = "SEX-W_20"; sexno = "1"; } DataRow dr_customerid = SQLmtm.GetDataRow("SELECT MAX(CUSTOMER_ID) AS CUSTOMER_ID FROM a_customer_p "); cUSTOMER_ID = Convert.ToInt32(dr_customerid["CUSTOMER_ID"]); cUSTOMER_ID++; int i1 = SQLmtm.DoInsert("a_customer_p", new string[] { "CUSTOMER_ID", "CUSTOMER_FIRST_NAME", "CUSTOMER_LAST_NAME", "MOBILE", "DEFAULT_ADDR_FLAG", "SEX_CD", "E_MAIL_URL", "DELETE_FLAG", "VERSION", "CUSTOMER_STATUS" }, new string[] { cUSTOMER_ID.ToString(), this.xing.Text, this.ming.Text, this.shouji.Text, "0", sEX_CD, this.eml.Text, "0", "1", "CUSTOMER_SOURCE-CS_SHOP" }); if (i1 != 1) { MessageBox.Show("保存失败"); } //a_customer_fit_count_r int i14 = SQLmtm.DoInsert("a_customer_fit_count_r", new string[] { "CUSTOMER_ID", "CUSTOMER_NAME", "SEX", "AGE", "CREATE_DATE", "DELETE_FLAG", "DEFAULT_FLAG", "DATA_COMPLETE" }, new string[] { cUSTOMER_ID.ToString(), customer_name, sexno, this.nianling.Text, DateTime.Now.ToUniversalTime().ToString(), "0", "1", "1" }); DataRow dr_customer_countid = SQLmtm.GetDataRow("SELECT MAX(ID) AS ID FROM a_customer_fit_count_r"); customer_countid = Convert.ToInt32(dr_customer_countid["ID"]); if (i14 != 1) { MessageBox.Show("保存失败"); } //门店客户表 int i2 = SQLmtm.DoInsert("a_shop_customer_r", new string[] { "SHOP_CUSTOMER_ID", "SHOP_ID", "CUSTOMER_ID" }, new string[] { (cUSTOMER_ID - 1).ToString(), "18", cUSTOMER_ID.ToString() }); ////取量体id //DataRow dr_customerfitid = SQLmtm.GetDataRow("SELECT MAX(CUSTOMER_FIT_ID) AS CUSTOMER_FIT_ID FROM a_customer_fit_r"); //cUSTOMER_FIT_ID = Convert.ToInt32(dr_customerfitid["CUSTOMER_FIT_ID"]); //cUSTOMER_FIT_ID++; if (i2 != 1) { MessageBox.Show("保存失败"); } //身高 int i3 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_09", "0", this.shengao.Text, customer_countid.ToString() }); if (i3 != 1) { MessageBox.Show("保存失败"); } //体重 int i4 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_10", "0", this.tizhong.Text, customer_countid.ToString() }); //cUSTOMER_FIT_ID++; if (i4 != 1) { MessageBox.Show("保存失败"); } //肩宽CODE int i5 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_05", "0", this.jiankuan.Text, customer_countid.ToString() }); //cUSTOMER_FIT_ID++; if (i5 != 1) { MessageBox.Show("保存失败"); } //胸围CODE int i6 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_02", "0", this.xiongwei.Text, customer_countid.ToString() }); //cUSTOMER_FIT_ID++; if (i6 != 1) { MessageBox.Show("保存失败"); } //腰围CODE int i7 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_12", "0", this.yaowei.Text, customer_countid.ToString() }); //cUSTOMER_FIT_ID++; if (i7 != 1) { MessageBox.Show("保存失败"); } //臀围CODE int i8 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_03", "0", this.tunwei.Text, customer_countid.ToString() }); //cUSTOMER_FIT_ID++; if (i8 != 1) { MessageBox.Show("保存失败"); } //身长CODE int i9 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_04", "0", this.shenchang.Text, customer_countid.ToString() }); //cUSTOMER_FIT_ID++; if (i9 != 1) { MessageBox.Show("保存失败"); } //领围CODE int i10 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_01", "0", this.lingwei.Text, customer_countid.ToString() }); //cUSTOMER_FIT_ID++; if (i10 != 1) { MessageBox.Show("保存失败"); } //腕围CODE int i11 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_08", "0", this.wanwei.Text, customer_countid.ToString() }); //cUSTOMER_FIT_ID++; if (i11 != 1) { MessageBox.Show("保存失败"); } //袖长CODE int i12 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_06", "0", this.xiuchang.Text, customer_countid.ToString() }); //cUSTOMER_FIT_ID++; if (i12 != 1) { MessageBox.Show("保存失败"); } //上臂袖肥CODE int i13 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_07", "0", this.shangbixiufei.Text, customer_countid.ToString() }); //cUSTOMER_FIT_ID++; if (i13 != 1) { MessageBox.Show("保存失败"); } //腹型CODE switch (this.fuxing.Text) { case "凹陷": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_02", "0", "4", customer_countid.ToString() }); break; case "平坦": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_02", "0", "5", customer_countid.ToString() }); break; case "微凸": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_02", "0", "6", customer_countid.ToString() }); break; case "中凸": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_02", "0", "7", customer_countid.ToString() }); break; case "重凸": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_02", "0", "8", customer_countid.ToString() }); break; } //cUSTOMER_FIT_ID++; //体型CODE switch (this.tixing.Text) { case "超瘦": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_03", "0", "CD03_01", customer_countid.ToString() }); break; case "标准": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_03", "0", "CD03_02", customer_countid.ToString() }); break; case "微胖": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_03", "0", "CD03_03", customer_countid.ToString() }); break; case "肥胖": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_03", "0", "CD03_04", customer_countid.ToString() }); break; case "肌肉": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_03", "0", "CD03_05", customer_countid.ToString() }); break; case "健身达人": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_03", "0", "CD03_06", customer_countid.ToString() }); break; } //cUSTOMER_FIT_ID++; //特征CODE switch (this.shentitezheng.Text) { case "背部厚实": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_05", "0", "CD05_01", customer_countid.ToString() }); break; case "脖子特别粗": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_05", "0", "CD05_02", customer_countid.ToString() }); break; case "臀部特别大": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_05", "0", "CD05_03", customer_countid.ToString() }); break; case "手臂特别长": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_05", "0", "CD05_04", customer_countid.ToString() }); break; case "肩部特别宽": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_05", "0", "CD05_05", customer_countid.ToString() }); break; case "脖子特别短": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_05", "0", "CD05_06", customer_countid.ToString() }); break; } //cUSTOMER_FIT_ID++; //肩型 switch (this.jianxing.Text) { case "平肩": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_01", "0", "1", customer_countid.ToString() }); break; case "溜肩": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_01", "0", "2", customer_countid.ToString() }); break; case "正常": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_01", "0", "3", customer_countid.ToString() }); break; } //cUSTOMER_FIT_ID++; //背型 switch (this.beixing.Text) { case "挺胸": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_04", "0", "CD04_01", customer_countid.ToString() }); break; case "直背": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_04", "0", "CD04_02", customer_countid.ToString() }); break; case "驼背": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" }, new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_04", "0", "CD04_03", customer_countid.ToString() }); break; } DataRow dr_addressid = SQLmtm.GetDataRow("SELECT MAX(ADDRESS_ID) AS ADDRESS_ID FROM a_customer_address_p"); aDDRESS_ID = Convert.ToInt32(dr_addressid["ADDRESS_ID"]); aDDRESS_ID++; SQLmtm.DoInsert("a_customer_address_p", new string[] { "ADDRESS_ID", "CUSTOMER_ID", "DEFAULT_ADDR_FLAG", "CONSIGNEE", "ADDRESS_PROVINCE_CD", "ADDRESS_CITY_CD", "ADDRESS_DISTRICT", "ADDRESS_DETAIL", "ZIP_CODE", "MOBILE", "DELETE_FLAG" }, new string[] { aDDRESS_ID.ToString(), cUSTOMER_ID.ToString(), "1", this.shouhuoren.Text, this.shengfen.Text, this.chengshi.Text, this.qvyv.Text, this.xiangxidizhi.Text, this.youbian.Text, this.shoujianshouji.Text, "0" }); String listFitData = null; try { DataTable dt = SQLmtm.GetDataTable("SELECT CUSTOMER_ID,ITEM_CD,ITEM_VALUE,FIT_VALUE FROM `a_customer_fit_r` WHERE FIT_COUNT_ID='" + customer_countid.ToString() + "'"); foreach (DataRow dr in dt.Rows) { listFitData = listFitData + dr["ITEM_CD"].ToString() + "-" + dr["ITEM_VALUE"].ToString() + ":" + dr["FIT_VALUE"] + ","; } } catch { MessageBox.Show("保存失败"); return; } FitValueCalculate fvc = new FitValueCalculate(customer_countid.ToString(), listFitData); String fjsondata = Newtonsoft.Json.JsonConvert.SerializeObject(fvc); //String entryDataJson = Newtonsoft.Json.JsonConvert.SerializeObject(class1); //RestCall.PostHttp("https://shirtmtm.com/fragsmart-mtm/customer/update/update", fjsondata); RestCall.PostHttp("http://localhost:8080/customer/update/update", fjsondata); MessageBox.Show("保存成功"); this.Close(); }
/// <summary> /// 动态加载尺寸控件 /// </summary> /// <param name="change"></param> /// <param name="sc"></param> public static void LoadChiCunCard(Frm定制下单修改尺寸 change, UC款式卡片 sc) { DataTable dt = SQLmtm.GetDataTable("SELECT\n" + " sp.FIT_ITEM_VALUE,\n" + " property.PROPERTY_CD propertyCd,\n" + "/*量体属性CD*/\n" + "property.PROPERTY_VALUE propertyValue,\n" + "/*量体VALUE*/\n" + " sp.ITEM_IN_FROM propertyInFrom,\n" + "/*量体属性值可增加范围从*/\n" + " sp.ITEM_IN_TO propertyInTo,\n" + "/*量体属性值可增加范围到*/\n" + " sp.ITEM_OUT_FROM propertyOutFrom,\n" + "/*量体属性值可缩减范围从*/\n" + " sp.ITEM_OUT_TO propertyOutTo,\n" + "/*量体属性值可缩减范围到*/\n" + " property.PROPERTY_NAME_CN propertyNameCn,\n" + "/*量体属性中文名称*/\n" + " property.FIT_USE_TYPE_CD fitUseTypeCd,\n" + "/*0-非净量体,1-净量体*/\n" + " property.PROPERTY_UNIT_CD propertyUnitCd ,\n" + " sp.ITEM_SORT,\n" + " sp.ITEM_CD,\n" + " sp.ITEM_VALUE\n" + "FROM\n" + " a_fit_property_p property\n" + " LEFT JOIN a_size_fit_p sp ON property.PROPERTY_CD = sp.ITEM_CD \n" + " AND property.PROPERTY_VALUE = sp.ITEM_VALUE \n" + "WHERE\n" + " property.PROPERTY_CD IN ( SELECT PROPERTY_VALUE FROM a_fit_property_p WHERE style_category_cd = '" + sc.sTYLE_CATEGORY_CD + "' ) \n" + " AND property.DEL_FLG = 0 \n" + " AND sp.FIT_CD = '" + sc.sTYLE_FIT_CD + "' /*款式*/\n" + " AND sp.SIZEGROUP_CD = '" + sc.sTYLE_SIZE_GROUP_CD + "' \n" + "-- AND sp.SIZE_CD = '" + sc.sTYLE_SIZE_CD + "' /*尺码*/\n" + " AND property.FIT_USE_TYPE_CD = \"FIT_USE_TYPE-FIT_TYPE_20\" \n" + " AND sp.ENABLE_FLAG = 1 \n" + " AND property.FIT_FLAG = 1 \n" + " AND sp.ITEM_VALUE != \"CIRCU_ITEM_09\" \n" + "GROUP BY property.PROPERTY_VALUE \n" + "ORDER BY\n" + " -- property.PROPERTY_CD,sp.ITEM_SORT ASC\n" + " sp.ITEM_SORT ASC"); //change.panel3.Controls.Clear(); height = 0; width = 0; int i = 0; panelLocition = new PanelLocition(change.panel4.Width, change.panel4.Height, dt.Rows.Count); UC尺寸头 hhh = new UC尺寸头(); ImpService.generateUserControl(hhh, i); change.panel4.Controls.Add(hhh); i++; foreach (DataRow dr in dt.Rows) { UC尺寸卡片 ccc = new UC尺寸卡片(dr["ITEM_CD"].ToString().Trim(), dr["ITEM_VALUE"].ToString(), dr["propertyNameCn"].ToString(), dr["FIT_ITEM_VALUE"].ToString(), change); ImpService.generateUserControl(ccc, i); change.panel4.Controls.Add(ccc);//将控件加入panel i++; } //DataTable ddt=SQLmtm.GetDataTable("") DataTable dtt = SQLmtm.GetDataTable("SELECT\n" + " *,\n"+ " SUBSTRING_INDEX( ap.REMARKS, ',', 1 )AS pv1,\n"+ " SUBSTRING_INDEX( ap.REMARKS, ',', -1 )AS pv2\n"+ "FROM\n" + " a_customer_fit_r ar\n"+ " LEFT JOIN a_fit_property_p ap ON ar.ITEM_VALUE = ap.PROPERTY_VALUE \n"+ "WHERE\n" + " FIT_COUNT_ID = '"+ Frm客户.customer_countid + "'"); foreach (Control card in change.panel4.Controls) { if (card is UC尺寸卡片) { UC尺寸卡片 c = (UC尺寸卡片)card; foreach (DataRow dr in dtt.Rows) { if (dr["pv1"].ToString() == c.iTEM_VALUE || dr["pv2"].ToString() == c.iTEM_VALUE) { c.kehu.Text = dr["FIT_VALUE"].ToString(); c.tiaozheng.Text = dr["FIT_VALUE_CALCULATE"].ToString(); } } } } }