//取meta数据 private void getMetaData(string metaId) { String viewDtostrMeta = RestCall.httpGetMethod("http://192.168.1.7:5090/meta/findByMetaId?metaId=" + metaId); Result metaInfos = Newtonsoft.Json.JsonConvert.DeserializeObject <Result>(viewDtostrMeta); List <MetaInfoDTO> metaInfoDTOs = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MetaInfoDTO> >(metaInfos.data.ToString()); foreach (MetaInfoDTO metaInfo in metaInfoDTOs) { this.Dt.Columns.Add(metaInfo.caption); RelationCaptionAndKey.Add(metaInfo.key, metaInfo.caption); } }
// 获取分录的token数据 public static List <TokenDataDto> getEntryTokenData(String billTokenId, String billMetaId, String entryMetaId) { String resultStr = RestCall.httpGetMethod(ShujvweihuConfig.businessServiceUri + "/bill/entry/bill-meta-id/bill-token-id/entry-meta-id?entryMetaId=" + entryMetaId + "&billMetaId=" + billMetaId + "&billTokenId=" + billTokenId); Result result = Newtonsoft.Json.JsonConvert.DeserializeObject <Result>(resultStr);; if (result.resultCode == 0) { return(Newtonsoft.Json.JsonConvert.DeserializeObject <List <TokenDataDto> >(result.data.ToString())); } else { MessageBox.Show("获取数据失败!"); return(null); } }
// 根据key获取常量 //public static string[] getConstants(String key) //{ // string selectUserSQL = "SELECT name from constant WHERE fkey = '" + key + "' and enabled = TRUE"; // DataTable dt = DBUtil.ExecuteDataTable(selectUserSQL); // if (null != dt || dt.Rows.Count > 0) // { // string constantsStr = dt.Rows[0][0].ToString(); // return constantsStr.Split(','); // } // return null; //} // 根据metaId和tokenId获取tokenDataDTO public static TokenDataDto getTokenDataDTO(String metaId, String tokenId) { String resultStr = RestCall.httpGetMethod(ShujvweihuConfig.businessServiceUri + "/bill/bill/meta-id/token-id?metaId=" + metaId + "&tokenId=" + tokenId); Result result = Newtonsoft.Json.JsonConvert.DeserializeObject <Result>(resultStr);; if (result.resultCode == 0 && null != result.data) { return(Newtonsoft.Json.JsonConvert.DeserializeObject <TokenDataDto>(result.data.ToString())); } else { MessageBox.Show("获取数据失败!"); return(null); } }
public ChangeService change(string metaid, string tokenid) { //this.WindowState = FormWindowState.Maximized; String viewDtostrMeta = RestCall.httpGetMethod("http://192.168.1.7:5090/meta/findByMetaId?metaId=" + metaid); Result metaInfos = Newtonsoft.Json.JsonConvert.DeserializeObject <Result>(viewDtostrMeta); List <MetaInfoDTO> metaInfoDTOs = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MetaInfoDTO> >(metaInfos.data.ToString()); //遍历meta,将meta放出列名 foreach (MetaInfoDTO metaInfo in metaInfoDTOs) { RelationCaptionAndKey.Add(metaInfo.key, metaInfo.caption); } String viewDtostrToken = RestCall.httpGetMethod("http://192.168.1.7:5090/bill/getBillDetail?metaId=" + metaid + "&tokenId=" + tokenid); Result previewResult = Newtonsoft.Json.JsonConvert.DeserializeObject <Result>(viewDtostrToken); Metadatas = Newtonsoft.Json.JsonConvert.DeserializeObject <Metadata>(previewResult.data.ToString()); return(this); }
private void simpleButton1_Click(object sender, EventArgs e) { if (this.shengao.Text == "" || this.tizhong.Text == "" || this.tixing.Text == "" || this.jianxing.Text == "" || this.fuxing.Text == "" || this.tunxing.Text == "") { MessageBox.Show("请填写完整"); return; } this.customerZero(); 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.tunxing.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; } //cUSTOMER_FIT_ID++; //臀型 switch (this.tunxing.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_07", "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_07", "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_07", "0", "3", 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(); }
// 调用存储过程 public static void storeProcedure(String metaId, String tokenId) { String resultStr = RestCall.httpGetMethod(ShujvweihuConfig.businessServiceUri + "/bill/submit/storeProcedure?metaId=" + metaId + "&tokenId=" + tokenId); }
/// <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; } }