コード例 #1
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();
         }
     }
 }
コード例 #2
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 });
        }
コード例 #3
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 });
        }