Esempio n. 1
0
        public static void LoadSheJiDian(Frm门店下单选款式 frm, String styleid)
        {
            frm.panel3.Controls.Clear();
            DataTable dt = SQLmtm.GetDataTable("select * from a_kuanshi_p where STYLEID =" + styleid);

            if (dt.Rows.Count == 0)
            {
                MessageBox.Show("请联系管理员完善相关信息");
                return;
            }
            height = 0;
            width  = 0;
            int i = 0;

            panelLocition = new PanelLocition(frm.panel3.Width, frm.panel3.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);
                    frm.panel3.Controls.Add(chooseCard);
                    i++;
                }
                else
                {
                    Frm面料选择.mianliaocd = dr["DEFAULT_CD"].ToString();
                    Frm面料选择.mianliaoid = dr["DEFAULT_VALUE"].ToString();
                    Frm面料选择.mianliao   = frm.mianliaoname.Text = dr["DEFAULT_NAME_CN"].ToString();
                }
            }
        }
Esempio n. 2
0
 public UC尺寸卡片(String itemcd, String itemvalue, String namecn, String fit_item_value, Frm门店下单选款式 frm)
 {
     iTEM_CD    = itemcd;
     iTEM_VALUE = itemvalue;
     nAME_CN    = namecn;
     InitializeComponent();
     this.label1.Text = nAME_CN;
     fIT_ITEM_VALUE   = fit_item_value;
     this.frm         = frm;
 }
Esempio n. 3
0
 /// <summary>
 /// 计算成衣尺寸
 /// </summary>
 /// <param name="frm"></param>
 public static void CountChiCun(Frm门店下单选款式 frm)
 {
     ImpService.TurnChiCunZero(frm);
     foreach (Control card in frm.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();
         }
     }
 }
Esempio n. 4
0
        /// <summary>
        /// 动态保存设计点
        /// </summary>
        /// <param name="frm"></param>
        /// <param name="dto"></param>
        public static void DynamicSaveDesign(Frm门店下单选款式 frm, Dto定制下单 dto)
        {
            UC设计点选择 c = new UC设计点选择();

            foreach (Control card in frm.panel3.Controls)
            {
                if (card is UC设计点选择)
                {
                    c = (UC设计点选择)card;
                    dto.build设计点(c.PitemCd, c.PitemValue, c.itemValue, "1", "0", c.itemName, c.PitemName, c.pic);
                    //                    SQLmtm.DoInsert("s_style_option_r", new string[] { "SYS_STYLE_ID", "ITEM_CD", "ITEM_VALUE", "OPTION_VALUE", "ENABLE_FLAG", "DELETE_FLAG" },
                    //new string[] { Change.styleid.ToString(), c.PitemCd, c.PitemValue, c.itemValue, "1", "0" });
                }
            }
        }
Esempio n. 5
0
 /// <summary>
 /// 刷新尺寸
 /// </summary>
 /// <param name="frm"></param>
 /// <param name="dt"></param>
 public static void RefreshChiCun(Frm门店下单选款式 frm, DataTable dt)
 {
     foreach (DataRow dr in dt.Rows)
     {
         foreach (Control card in frm.panel4.Controls)
         {
             if (card is UC尺寸卡片)
             {
                 UC尺寸卡片 c = (UC尺寸卡片)card;
                 if (dr["ITEM_VALUE"].ToString() == c.iTEM_VALUE)
                 {
                     c.biaozhun.Text = dr["ITEM_FIT_VALUE"].ToString();
                     break;
                 }
             }
         }
     }
 }
Esempio n. 6
0
 public UC面料卡片(String mianliao, String mianliaoid, String mianliaocd, String picurl, String picn, Frm面料选择 form, Frm门店下单选款式 frm)
 {
     InitializeComponent();
     this.frm         = frm;
     this.flag        = true;
     this.mianliao    = mianliao;
     this.mianliaoid  = mianliaoid;
     this.mianliaocd  = mianliaocd;
     this.picurl      = picurl;
     this.picn        = picn;
     this.form        = form;
     this.label1.Text = this.mianliao;
     try
     {
         this.pictureBox1.Image = Image.FromFile(@"pic\" + this.picn.Trim());
     }
     catch
     {
     }
 }
Esempio n. 7
0
 /// <summary>
 /// 尺寸空设为0
 /// </summary>
 /// <param name="frm"></param>
 public static void TurnChiCunZero(Frm门店下单选款式 frm)
 {
     foreach (Control card in frm.panel4.Controls)
     {
         if (card is UC尺寸卡片)
         {
             UC尺寸卡片 c = (UC尺寸卡片)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";
             }
         }
     }
 }
Esempio n. 8
0
 public UC款式卡片(Frm门店下单选款式 form, String flag, DataRow dr)
 {
     InitializeComponent();
     this.frm  = form;
     this.flag = flag;
     this.stylecardlabel.Text       = dr["styleEntity.styleNameCn"].ToString();
     this.kuanshiid                 = dr["styleId"].ToString();
     this.kuanshimingcheng          = dr["styleEntity.styleNameCn"].ToString();
     this.mianliaoid                = dr["materialEntity.id"].ToString();
     this.mianliaomingcheng         = dr["materialEntity.materialNameCn"].ToString();
     this.sTYLE_CATEGORY_CD         = dr["styleEntity.styleCategoryCd"].ToString();
     this.sTYLE_FIT_CD              = dr["styleEntity.styleFitCd"].ToString();
     this.sTYLE_SIZE_GROUP_CD       = dr["styleEntity.styleSizeGroupCd"].ToString();
     this.sTYLE_DRESS_CATEGORY      = dr["styleEntity.styleDressCategory"].ToString();
     this.sTYLE_DESIGN_TYPE         = dr["styleEntity.styleDesignType"].ToString();
     this.sTYLE_PUBLISH_CATEGORY_CD = dr["styleEntity.stylePublishCategoryCd"].ToString();
     this.sYTLE_YEAR                = dr["styleEntity.sytleYear"].ToString();
     this.sYTLE_SEASON              = dr["styleEntity.sytleSeason"].ToString();
     this.sTYLE_SIZE_CD             = dr["styleEntity.styleSizeCd"].ToString();
     //sc.id = cd.id;
     //sc.banid = cd.banid;
     //sc.jiage = cd.jiage;
     this.picture = @"pic\" + dr["picn"].ToString();
 }
Esempio n. 9
0
        /// <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 });
        }
Esempio n. 10
0
        public static void LoadChiCunCard(Frm门店下单选款式 frm)
        {
            String sql = "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 = '" + frm.model.Dto定制下单.STYLE_CATEGORY_CD + "' ) \n" +
                         " AND property.DEL_FLG = 0 \n" +
                         "  AND sp.FIT_CD = '" + frm.model.Dto定制下单.STYLE_FIT_CD + "'  /*款式*/\n" +
                         " AND sp.SIZEGROUP_CD = '" + frm.model.Dto定制下单.STYLE_SIZE_GROUP_CD + "' \n" +
                         "-- AND sp.SIZE_CD = '" + frm.model.Dto定制下单.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";
            DataTable dt = SQLmtm.GetDataTable(sql);

            //change.panel3.Controls.Clear();
            height = 0;
            width  = 0;
            int i = 0;

            panelLocition = new PanelLocition(frm.panel4.Width, frm.panel4.Height, 0);
            UC尺寸头 hhh = new UC尺寸头();

            ImpService.generateUserControl(hhh, i);
            frm.panel4.Controls.Clear();
            frm.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(), frm);
                ImpService.generateUserControl(ccc, i);
                frm.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 frm.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();
                        }
                    }
                }
            }
        }