Пример #1
0
        /// <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();
                }
            }
        }
Пример #2
0
 /// <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 });
 }
Пример #3
0
 public UC尺寸卡片(String itemcd, String itemvalue, String namecn, String fit_item_value, Frm定制下单修改尺寸 change)
 {
     iTEM_CD    = itemcd;
     iTEM_VALUE = itemvalue;
     nAME_CN    = namecn;
     InitializeComponent();
     this.label1.Text = nAME_CN;
     fIT_ITEM_VALUE   = fit_item_value;
     this.change      = change;
 }
Пример #4
0
 /// <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();
         }
     }
 }
Пример #5
0
        /// <summary>
        /// 动态设计点保存
        /// </summary>
        /// <param name="change"></param>
        public static void DynamicSaveDesign(Frm定制下单修改尺寸 change)
        {
            UC设计点选择 c = new UC设计点选择();

            foreach (Control card in change.panel6.Controls)
            {
                if (card is UC设计点选择)
                {
                    c = (UC设计点选择)card;
                    SQLmtm.DoInsert("s_style_option_r", new string[] { "SYS_STYLE_ID", "ITEM_CD", "ITEM_VALUE", "OPTION_VALUE", "ENABLE_FLAG", "DELETE_FLAG" },
                                    new string[] { Frm定制下单修改尺寸.styleid.ToString(), c.PitemCd, c.PitemValue, c.itemValue, "1", "0" });
                }
            }
        }
Пример #6
0
        //    public static void ReviseDynamicSaveSize(ReviseStyle form, int sTYLE_FIT_ID, String customername)
        //    {
        //        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);
        //            }
        //        }
        //        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 });
        //    }

        /// <summary>
        /// 刷新尺寸
        /// </summary>
        /// <param name="change"></param>
        /// <param name="dt"></param>
        public static void RefreshChiCun(Frm定制下单修改尺寸 change, DataTable dt)
        {
            foreach (DataRow dr in dt.Rows)
            {
                foreach (Control card in change.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;
                        }
                    }
                }
            }
        }
Пример #7
0
 /// <summary>
 /// 修改款式刷新尺寸
 /// </summary>
 /// <param name="form"></param>
 /// <param name="dt"></param>
 //public static void RefreshChiCun(ReviseStyle form, DataTable dt)
 //{
 //foreach (DataRow dr in dt.Rows)
 //{
 //    foreach (Control card in form.panel4.Controls)
 //    {
 //        if (card is ChiCunCard)
 //        {
 //            ChiCunCard c = (ChiCunCard)card;
 //            if (dr["ITEM_VALUE"].ToString() == c.iTEM_VALUE)
 //            {
 //                c.biaozhun.Text = dr["ITEM_FIT_VALUE"].ToString();
 //                break;
 //            }
 //        }
 //    }
 //}
 //}
 /// <summary>
 /// 将空尺寸设为0
 /// </summary>
 /// <param name="change"></param>
 public static void TurnChiCunZero(Frm定制下单修改尺寸 change)
 {
     foreach (Control card in change.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";
             }
         }
     }
 }
Пример #8
0
        /// <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 });
        }
Пример #9
0
        /// <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();
                        }
                    }
                }
            }
        }