/// <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> /// s_style_p插入数据 /// </summary> /// <param name="change"></param> /// <param name="uc"></param> public static void insertS_Style_P(Frm定制下单修改尺寸 change, UC款式卡片 uc) { Frm定制下单修改尺寸.sTYLE_SIZE_CD = SizeService.SizeCD(change.chicun01.Text.Trim(), Frm定制下单修改尺寸.stylesizedt); //DataRow drstyle = SQLmtm.GetDataRow("SELECT MAX(SYS_STYLE_ID) SYS_STYLE_ID FROM `s_style_p`"); //Change.styleid = Convert.ToInt32(drstyle["SYS_STYLE_ID"]); //Change.styleid++; SQLmtm.DoInsert("s_style_p", new string[] { "SYS_STYLE_ID", "SHOP_ID", "STYLE_CD", "STYLE_KBN", "STYLE_CATEGORY_CD", "SYTLE_FABRIC_ID", "STYLE_SIZE_GROUP_CD", "STYLE_SIZE_CD", "STYLE_MAKE_TYPE", "ENABLE_FLAG", "DELETE_FLAG", "VERSION", "STYLE_NAME_CN", "REMARKS", "CUSTOMER_COUNT_ID", "STYLE_FIT_CD", "REF_STYLE_ID", "STYLE_DRESS_CATEGORY", "STYLE_DESIGN_TYPE", "STYLE_PUBLISH_CATEGORY_CD", "SYTLE_YEAR", "SYTLE_SEASON" }, new string[] { Frm定制下单修改尺寸.styleid.ToString(), "18", "", "STYLE_SOURCE-STYLE_SOURCE_50", uc.sTYLE_CATEGORY_CD, Frm面料选择.mianliaoid, uc.sTYLE_SIZE_GROUP_CD, Frm定制下单修改尺寸.sTYLE_SIZE_CD, "4SMA-4M", "1", "0", "1", uc.kuanshimingcheng, "", Frm客户.customer_countid.ToString(), uc.sTYLE_FIT_CD, uc.kuanshiid, uc.sTYLE_DRESS_CATEGORY, uc.sTYLE_DESIGN_TYPE, uc.sTYLE_PUBLISH_CATEGORY_CD, uc.sYTLE_YEAR, uc.sYTLE_SEASON }); }
public Frm定制下单修改尺寸(UC款式卡片 uc) { this.WindowState = FormWindowState.Maximized;//窗体最大化 this.uc = uc; InitializeComponent(); this.label8.Text = uc.stylecardlabel.Text; kuanshiid = uc.kuanshiid; try { this.pictureBox1.Image = Image.FromFile(uc.picture); } catch { } //clothingName= uc.stylecardlabel.Text; //this.pictureBox1.Load("C:/Users/Doge/Documents/text.jpg"); //BasicInformation(); //StyleDesign = ImpService.initCombobox(this); }
/// <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(); } } } } }
/// <summary> /// 标准款s_style_p写入数据 /// </summary> /// <param name="uc"></param> public static void insertS_Style_P(UC款式卡片 uc) { SQLmtm.DoInsert("s_style_p", new string[] { "SYS_STYLE_ID", "SHOP_ID", "STYLE_CD", "STYLE_KBN", "STYLE_CATEGORY_CD", "SYTLE_FABRIC_ID", "STYLE_SIZE_GROUP_CD", "STYLE_SIZE_CD", "STYLE_MAKE_TYPE", "ENABLE_FLAG", "DELETE_FLAG", "VERSION", "STYLE_NAME_CN", "REMARKS", "CUSTOMER_COUNT_ID", "STYLE_FIT_CD", "REF_STYLE_ID", "STYLE_DRESS_CATEGORY", "STYLE_DESIGN_TYPE", "STYLE_PUBLISH_CATEGORY_CD", "SYTLE_YEAR", "SYTLE_SEASON" }, new string[] { Frm定制下单修改尺寸.styleid.ToString(), "18", "", "STYLE_SOURCE-STYLE_SOURCE_50", uc.sTYLE_CATEGORY_CD, Frm面料选择.mianliaoid, uc.sTYLE_SIZE_GROUP_CD, Frm定制下单修改尺寸.sTYLE_SIZE_CD, "4SMA-4M", "1", "0", "1", uc.kuanshimingcheng, "", Frm客户.customer_countid.ToString(), uc.sTYLE_FIT_CD, uc.kuanshiid, uc.sTYLE_DRESS_CATEGORY, uc.sTYLE_DESIGN_TYPE, uc.sTYLE_PUBLISH_CATEGORY_CD, uc.sYTLE_YEAR, uc.sYTLE_SEASON }); }