Ejemplo n.º 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();
                }
            }
        }
Ejemplo n.º 2
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" });
                }
            }
        }
Ejemplo n.º 3
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" });
                }
            }
        }
Ejemplo n.º 4
0
        public Frm设计点(UC设计点选择 card, Enum选择设计点类型 enum选择设计点类型)
        {
            InitializeComponent();
            this.enum选择设计点类型 = enum选择设计点类型;
            this.card        = card;
            this.PitemName   = this.card.PitemName;
            this.PitemValue  = this.card.PitemValue;

            if (this.enum选择设计点类型 == Enum选择设计点类型.全部)
            {
                this.Text = "选择全部" + this.card.PitemName;
                generatePictureLayout();
            }
            if (this.enum选择设计点类型 == Enum选择设计点类型.默认)
            {
                this.Text = "选择默认" + this.card.PitemName;
                generatePictureLayout();
            }
        }
Ejemplo n.º 5
0
 public UC设计点卡片(String itemname, String itemcd, String itemvalue, String picn, Frm设计点 allform, UC设计点选择 card)
 {
     InitializeComponent();
     this.flag        = false;
     this.itemName    = itemname;
     this.itemCd      = itemcd;
     this.itemValue   = itemvalue;
     this.picN        = picn;
     this.label1.Text = this.itemValue + ":" + this.itemName;
     this.allform     = allform;
     this.card        = card;
     try
     {
         this.pictureBox1.Image = Image.FromFile(@"pic\" + this.picN.Trim());
     }
     catch
     {
     }
 }
Ejemplo n.º 6
0
 public DefaultSheJiDian(UC设计点选择 card)
 {
     InitializeComponent();
     this.card = card;
 }