private void DefaultSheJiDian_Load(object sender, EventArgs e) { this.splashScreenManager1.ShowWaitForm(); this.splashScreenManager1.SetWaitFormCaption("请稍后,正在加载中...."); // 标题 this.splashScreenManager1.SetWaitFormDescription("正在初始化....."); // 信息 DataTable dt = new DataTable(); if (dt.Rows.Count == 0) { this.splashScreenManager1.CloseWaitForm(); MessageBox.Show("请联系管理员完善相关信息"); this.Close(); return; } 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) { UC设计点卡片 card = new UC设计点卡片(dr["ITEM_NAME_CN"].ToString(), dr["ITEM_CD"].ToString(), dr["ITEM_VALUE"].ToString(), dr["picn"].ToString(), this, this.card); generateUserControl(card, i); this.panel1.Controls.Add(card); i++; } UC设计点卡片 carD = new UC设计点卡片("无", this.card.PitemValue, "无", "", this, this.card); generateUserControl(carD, i); this.panel1.Controls.Add(carD); this.splashScreenManager1.CloseWaitForm(); }
/// <summary> /// 图片布局 /// </summary> private void generatePictureLayout() { this.panel1.Controls.Clear(); height = 0; width = 0; int i = 0; DataTable dt = StyleService.initStyle(this.textBox1.Text, Frm定制下单.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) { UC款式卡片 sc = new UC款式卡片("Change", dr); this.generateUserControl(sc, i); this.panel1.Controls.Add(sc);//将控件加入panel try { sc.stylecardpicbox.Image = Image.FromFile(sc.picture); } catch { } i++; } this.fenYeLan1.label1.Text = Frm定制下单.page.ToString(); this.splashScreenManager.CloseWaitForm(); }
/// <summary> /// 修改款式计算成衣尺寸 /// </summary> /// <param name="form"></param> //public static void CountChiCun(ReviseStyle form) //{ //ImpService.TurnChiCunZero(form); //foreach (Control card in form.panel4.Controls) //{ // if (card is ChiCunCard) // { // ChiCunCard c = (ChiCunCard)card; // c.chengyi.Text = (Convert.ToDouble(c.biaozhun.Text) + Convert.ToDouble(c.jia.Text) - Convert.ToDouble(c.jian.Text)).ToString(); // } //} //} /// <summary> /// 修改款式修改尺寸 /// </summary> /// <param name="form"></param> //public static void ReviseChangeChiCun(ReviseStyle form, String sizecd) //{ // int i2 = SQLmtm.DoUpdate("s_style_p", new string[] { "STYLE_SIZE_CD" }, new string[] { sizecd }, new string[] { "SYS_STYLE_ID" }, new string[] { ReviseStyle.sYS_STYLE_ID }); // if (i2 != 1) // { // MessageBox.Show("更改尺寸失败"); // return; // } // ImpService.TurnChiCunZero(form); // Fit_ValueDTo fitv = new Fit_ValueDTo(); // foreach (Control card in form.panel4.Controls) // { // if (card is ChiCunCard) // { // ChiCunCard c = (ChiCunCard)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); // } // } // int i = SQLmtm.DoUpdate("a_customer_fit_value_r", new string[] { "ITEM_CD", "ITEM_VALUE", "FIT_VALUE", "FM_VALUE", "IN_VALUE", "OUT_VALUE" }, new string[] { fitv.iTEM_CD, fitv.iTEM_VALUE, fitv.fitValue, fitv.fM_VALUE, fitv.iN_VALUE, fitv.oUT_VALUE }, new string[] { "CUSTOMER_COUNT_ID" }, new string[] { CreateCustomer.customer_countid.ToString() }); // if (i != 1) // { // MessageBox.Show("更改尺寸失败"); // return; // } // int i1 = SQLmtm.DoUpdate("s_style_fit_r", new string[] { "ITEM_CD", "ITEM_VALUE", "FIT_VALUE", "FM_VALUE", "IN_VALUE", "OUT_VALUE" }, new string[] { fitv.iTEM_CD, fitv.iTEM_VALUE, fitv.fitValue, fitv.fM_VALUE, fitv.iN_VALUE, fitv.oUT_VALUE }, new string[] { "STYLE_ID" }, new string[] { ReviseStyle.sYS_STYLE_ID }); // if (i1 != 1) // { // MessageBox.Show("更改尺寸失败"); // return; // } //} /// <summary> /// 修改款式客户基本信息加载 /// </summary> /// <param name="form"></param> //public static void ReviseLoudCustomer(ReviseStyle form) //{ // DataRow drr = SQLmtm.GetDataRow("SELECT * FROM o_order_p WHERE STYLE_ID='" + ReviseStyle.sYS_STYLE_ID + "'"); // form.beizhu01.Text = drr["REMARKS"].ToString(); // form.dangqiankehu.Text = drr["CUSTOM_NAME"].ToString(); // DataTable dt = SQLmtm.GetDataTable("SELECT * FROM (SELECT * FROM a_customer_fit_r) s1 RIGHT JOIN (SELECT * FROM a_customer_fit_count_r WHERE CUSTOMER_ID ='" + drr["CUSTOMER_ID"].ToString() + "' AND DEFAULT_FLAG ='1') s2 on s1.FIT_COUNT_ID=s2.ID"); // //if(dt.Rows[0]["CUSTOMER_FIT_ID"].ToString()!="") // //{ // foreach (DataRow dr in dt.Rows) // { // if (dr["ITEM_VALUE"].ToString() == "FITMT_ITEM_09") // { // form.kehushengao.Text = dr["FIT_VALUE"].ToString(); // } // if (dr["ITEM_VALUE"].ToString() == "FITMT_ITEM_10") // { // form.kehutizhong.Text = dr["FIT_VALUE"].ToString(); // } // if (dr["ITEM_VALUE"].ToString() == "FITMT_CODE_01") // { // switch (dr["FIT_VALUE"].ToString()) // { // case "1": // form.kehujianxing.Text = "平肩"; // break; // case "2": // form.kehujianxing.Text = "溜肩"; // break; // case "3": // form.kehujianxing.Text = "正常"; // break; // } // } // if (dr["ITEM_VALUE"].ToString() == "FITMT_CODE_02") // { // switch (dr["FIT_VALUE"].ToString()) // { // case "4": // form.kehuduxing.Text = "凹陷"; // break; // case "5": // form.kehuduxing.Text = "平坦"; // break; // case "6": // form.kehuduxing.Text = "微凸"; // break; // case "7": // form.kehuduxing.Text = "中凸"; // break; // case "8": // form.kehuduxing.Text = "重凸"; // break; // } // } // } //} /// <summary> /// 修改款式修改备注 /// </summary> /// <param name="form"></param> //public static void ReviseSaveBeiZhu(ReviseStyle form) //{ // int i = SQLmtm.DoUpdate("o_order_p", new string[] { "REMARKS" }, new string[] { form.beizhu01.Text }, new string[] { "ORDER_ID" }, new string[] { ReviseStyle.oRDER_ID }); // if (i != 1) // { // MessageBox.Show("修改备注失败"); // return; // } //} /// <summary> /// 动态加载设计点控件 /// </summary> /// <param name="change"></param> public static void LoadSheJiDian(Frm定制下单修改尺寸 change, String styleid) { DataTable dt = SQLmtm.GetDataTable("select * from a_kuanshi_p where STYLEID =" + styleid); if (dt.Rows.Count == 0) { MessageBox.Show("请联系管理员完善相关信息"); return; } change.panel6.Controls.Clear(); height = 0; width = 0; int i = 0; panelLocition = new PanelLocition(change.panel6.Width, change.panel6.Height, dt.Rows.Count); foreach (DataRow dr in dt.Rows) { if (dr["ITEM_VALUE"].ToString() != "mianliaoid") { UC设计点选择 chooseCard = new UC设计点选择(dr["id"].ToString(), dr["ITEM_NAME_CN"].ToString(), dr["ITEM_CD"].ToString(), dr["ITEM_VALUE"].ToString(), dr["DEFAULT_NAME_CN"].ToString(), dr["DEFAULT_CD"].ToString(), dr["DEFAULT_VALUE"].ToString(), ""); ArrayUC(chooseCard, i); change.panel6.Controls.Add(chooseCard); i++; } else { Frm面料选择.mianliaocd = dr["DEFAULT_CD"].ToString(); Frm面料选择.mianliaoid = dr["DEFAULT_VALUE"].ToString(); Frm面料选择.mianliao = change.mianliaoname.Text = dr["DEFAULT_NAME_CN"].ToString(); } } }
/// <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(); }
/// <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(); }
/// <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 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 DoButtonClick() { this.splashScreenManager1.ShowWaitForm(); this.splashScreenManager1.SetWaitFormCaption("请稍后,正在加载中...."); // 标题 this.splashScreenManager1.SetWaitFormDescription("正在初始化....."); // 信息 DataTable dt = SQLmtm.GetDataTable("SELECT\n" + " s1.itemValue ,\n"+ " s1.itemNameCn ,\n"+ "S2.UPLOAD_FILE AS picn,\n" + " s2.picurl \n"+ "FROM\n" + " (\n"+ " SELECT\n"+ " ap.ITEM_VALUE itemValue,\n"+ " ap.DESIGN_ID id,\n"+ " CONCAT( ap.ITEM_VALUE, \":\", ap.ITEM_NAME_CN ) itemNameCn,\n"+ " ap.ITEM_CD itemCode,\n"+ " adp.ITEM_CD itemParentCode \n"+ " FROM\n"+ " a_designoption_p ap\n"+ " LEFT JOIN a_designoption_p adp ON adp.ITEM_VALUE = ap.ITEM_CD\n"+ " LEFT JOIN a_ognization_desgin_r adr ON ap.DESIGN_ID = adr.DESGIN_ID \n"+ " WHERE\n"+ " ( ap.ITEM_CATEGORY_CD = \"\" OR ap.ITEM_CATEGORY_CD IS NULL ) \n"+ " AND ap.STYLE_CATEGORY_CD = 'STYLE_CATEGORY-SHIRT' \n"+ " AND ap.ITEM_CD = '4HYS' -- AND ap.ITEM_CD IN ( SELECT ap.ITEM_VALUE itemValue FROM a_designoption_p ap WHERE ap.ITEM_CATEGORY_CD ='ITEM_TYPE_CD-10' )\n"+ " \n"+ " AND adr.OGNIZATION_ID = 95 \n"+ " AND ap.ITEM_VALUE IN (\n"+ " SELECT\n"+ " ap.ITEM_VALUE itemValue \n"+ " FROM\n"+ " a_designoption_p ap \n"+ " WHERE\n"+ " ap.DESIGN_ID IN ( SELECT ar.DESGIN_ID FROM a_shop_desgin_r ar WHERE ar.SHOP_ID = 18 ) \n"+ " ) \n"+ " ORDER BY\n"+ " ap.ITEM_CD,\n"+ " ap.ITEM_SORT ASC \n"+ " ) AS s1\n"+ " LEFT JOIN (\n"+ " SELECT\n"+ " a.ITEM_CD,\n"+ " a.ITEM_VALUE,\n"+ " a.ITEM_NAME_CN,\n"+ " CONCAT( 'https://sshirtmtmbucket.oss-cn-zhangjiakou.aliyuncs.com/sshirtmtm/', w.UPLOAD_FILE ) AS picurl,\n"+ " w.* \n"+ " FROM\n"+ " a_designoption_p a\n"+ " LEFT JOIN w_upload_file_p w ON a.FILE_ID = w.FILE_ID \n"+ " WHERE\n"+ " a.FILE_ID IS NOT NULL \n"+ " ) AS s2 ON s1.itemCode = s2.ITEM_CD \n"+ " AND s1.itemValue = s2.ITEM_VALUE"); 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) { HouYaoShengCard oc = new HouYaoShengCard(this); oc.label1.Text = dr["itemNameCn"].ToString(); oc.houyaosheng = dr["itemNameCn"].ToString(); oc.houyaoshengid = dr["itemValue"].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.splashScreenManager1.CloseWaitForm(); }
/// <summary> /// 查找 /// </summary> private void DoButtonClick() { this.splashScreenManager1.ShowWaitForm(); this.splashScreenManager1.SetWaitFormCaption("请稍后,正在加载中...."); // 标题 this.splashScreenManager1.SetWaitFormDescription("正在初始化....."); // 信息 //DataTable dt = SQLmtm.GetDataTable("SELECT ITEM_VALUE AS 领子id,ITEM_NAME_CN AS 领子名 FROM `a_designoption_p` WHERE ITEM_CD='4SCO' AND (ITEM_VALUE LIKE '%"+this.textBox1.Text+"%' OR ITEM_NAME_CN LIKE '%"+this.textBox1.Text+"%')"); //gridControl1.DataSource = dt; DataTable dt = SQLmtm.GetDataTable("SELECT\n" + " s1.itemValue AS 领子id,\n"+ " s1.itemNameCn AS 领子名,\n"+ "S2.UPLOAD_FILE AS picn,\n" + " s2.picurl \n"+ "FROM\n" + " (\n"+ " SELECT\n"+ " ap.ITEM_VALUE itemValue,\n"+ " ap.DESIGN_ID id,\n"+ " CONCAT( ap.ITEM_VALUE, \":\", ap.ITEM_NAME_CN ) itemNameCn,\n"+ " ap.ITEM_CD itemCode,\n"+ " adp.ITEM_CD itemParentCode \n"+ " FROM\n"+ " a_designoption_p ap\n"+ " LEFT JOIN a_designoption_p adp ON adp.ITEM_VALUE = ap.ITEM_CD\n"+ " LEFT JOIN a_ognization_desgin_r adr ON ap.DESIGN_ID = adr.DESGIN_ID \n"+ " WHERE\n"+ " ( ap.ITEM_CATEGORY_CD = \"\" OR ap.ITEM_CATEGORY_CD IS NULL ) \n"+ " AND ap.STYLE_CATEGORY_CD = 'STYLE_CATEGORY-SHIRT' \n"+ " AND ap.ITEM_CD = '4SCO' -- AND ap.ITEM_CD IN ( SELECT ap.ITEM_VALUE itemValue FROM a_designoption_p ap WHERE ap.ITEM_CATEGORY_CD ='ITEM_TYPE_CD-10' )\n"+ " \n"+ " AND adr.OGNIZATION_ID = 95 \n"+ " AND ap.ITEM_VALUE IN (\n"+ " SELECT\n"+ " ap.ITEM_VALUE itemValue \n"+ " FROM\n"+ " a_designoption_p ap \n"+ " WHERE\n"+ " ap.DESIGN_ID IN ( SELECT ar.DESGIN_ID FROM a_shop_desgin_r ar WHERE ar.SHOP_ID = 18 ) \n"+ " ) \n"+ " ORDER BY\n"+ " ap.ITEM_CD,\n"+ " ap.ITEM_SORT ASC \n"+ " ) AS s1\n"+ " LEFT JOIN (\n"+ " SELECT\n"+ " a.ITEM_CD,\n"+ " a.ITEM_VALUE,\n"+ " a.ITEM_NAME_CN,\n"+ " CONCAT( 'https://sshirtmtmbucket.oss-cn-zhangjiakou.aliyuncs.com/sshirtmtm/', w.UPLOAD_FILE ) AS picurl,\n"+ " w.* \n"+ " FROM\n"+ " a_designoption_p a\n"+ " LEFT JOIN w_upload_file_p w ON a.FILE_ID = w.FILE_ID \n"+ " WHERE\n"+ " a.FILE_ID IS NOT NULL \n"+ " ) AS s2 ON s1.itemCode = s2.ITEM_CD \n"+ " AND s1.itemValue = s2.ITEM_VALUE"); 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) { LingZiCard oc = new LingZiCard(this); oc.label1.Text = dr["领子名"].ToString(); oc.lingzi = dr["领子名"].ToString(); oc.lingziid = dr["领子id"].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.Load(@"pic\" + dr["picn"].ToString().Trim()); 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.splashScreenManager1.CloseWaitForm(); }
/// <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(); } } } } }