예제 #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
        private void RefreshGridcontrol()
        {
            DataTable dt = SQLmtm.GetDataTable("SELECT ORDER_ID,ORDER_NO,CUSTOM_NAME,ORDER_DATE,STYLE_ID ,ORDER_DATE FROM `o_order_p` ORDER BY ORDER_DATE DESC LIMIT 1000");

            //DataTable dt = DBUtil.GetDataTable("SELECT b.id,b.xingming AS 姓名,b.shouji AS 手机,b.dizhi AS 地址,e.kuanid AS 款号,e.kuanshi AS 款式,e.chima AS 尺码,e.mianliao AS 面料,e.lingzi AS 领子,e.xiutou AS 袖头,e.qianli AS 前立,e.houbeikuanshi AS 后背款式, e.xiuxing as 袖型,e.xiukaiqi AS 袖开祺,e.xiongdou as 胸兜,e.dibai AS 底摆,e.bujianpeiliao as 部件配料,b.chuangjianshijian AS 创建时间,e.shuliang AS 数量,e.jiage AS 总价格,b.dingdanzhuangtai AS 订单状态 FROM chunshan_dingdan_bill_________new AS b LEFT JOIN chunshan_dingdan_entry_________new as e on b.entryid=e.id ORDER BY 创建时间 DESC");
            this.gridControl1.DataSource = dt;
            this.gridControl1.Refresh();
        }
예제 #3
0
        public SheJiDianPicList()
        {
            DataTable dt = SQLmtm.GetDataTable("SELECT\n" +
                                               "S1.itemCode,\n" +
                                               "s1.itemValue ,\n" +
                                               "s1.itemNameCn,\n" +
                                               "S2.UPLOAD_FILE AS picn,\n" +
                                               "s2.picurl \n" +
                                               "FROM\n" +
                                               "(\n" +
                                               "SELECT\n" +
                                               "	ap.ITEM_VALUE itemValue,\n"+
                                               "	ap.DESIGN_ID id,\n"+
                                               "	CONCAT( ap.ITEM_VALUE, \":\", ap.ITEM_NAME_CN ) itemNameCn,\n"+
                                               "	ap.ITEM_CD itemCode,\n"+
                                               "	adp.ITEM_CD itemParentCode \n"+
                                               "FROM\n" +
                                               "	a_designoption_p ap\n"+
                                               "	LEFT JOIN a_designoption_p adp ON adp.ITEM_VALUE = ap.ITEM_CD\n"+
                                               "	LEFT JOIN a_ognization_desgin_r adr ON ap.DESIGN_ID = adr.DESGIN_ID \n"+
                                               "WHERE\n" +
                                               "	( ap.ITEM_CATEGORY_CD = \"\" OR ap.ITEM_CATEGORY_CD IS NULL ) \n"+
                                               "	AND ap.STYLE_CATEGORY_CD = 'STYLE_CATEGORY-SHIRT' \n"+
                                               "	-- AND ap.ITEM_CD = '4SFP' -- AND ap.ITEM_CD IN ( SELECT ap.ITEM_VALUE itemValue FROM a_designoption_p ap WHERE ap.ITEM_CATEGORY_CD ='ITEM_TYPE_CD-10' )\n"+
                                               "	\n"+
                                               "	AND adr.OGNIZATION_ID = 95 \n"+
                                               "	AND ap.ITEM_VALUE IN (\n"+
                                               "	SELECT\n"+
                                               "		ap.ITEM_VALUE itemValue \n"+
                                               "	FROM\n"+
                                               "		a_designoption_p ap \n"+
                                               "	WHERE\n"+
                                               "		ap.DESIGN_ID IN ( SELECT ar.DESGIN_ID FROM a_shop_desgin_r ar WHERE ar.SHOP_ID = 18 ) \n"+
                                               "	) \n"+
                                               "ORDER BY\n" +
                                               "	ap.ITEM_CD,\n"+
                                               "	ap.ITEM_SORT ASC \n"+
                                               ") AS s1\n" +
                                               "LEFT JOIN (\n" +
                                               "SELECT\n" +
                                               "	a.ITEM_CD,\n"+
                                               "	a.ITEM_VALUE,\n"+
                                               "	a.ITEM_NAME_CN,\n"+
                                               "	CONCAT( 'https://sshirtmtmbucket.oss-cn-zhangjiakou.aliyuncs.com/sshirtmtm/', w.UPLOAD_FILE ) AS picurl,\n"+
                                               "	w.* \n"+
                                               "FROM\n" +
                                               "	a_designoption_p a\n"+
                                               "	LEFT JOIN w_upload_file_p w ON a.FILE_ID = w.FILE_ID \n"+
                                               "WHERE\n" +
                                               "	a.FILE_ID IS NOT NULL \n"+
                                               ") AS s2 ON s1.itemCode = s2.ITEM_CD \n" +
                                               "AND s1.itemValue = s2.ITEM_VALUE");

            foreach (DataRow dr in dt.Rows)
            {
                this.shejidianpiclist.Add(new SheJiDianPic(dr["itemCode"].ToString().Trim(), dr["itemValue"].ToString().Trim(), dr["itemNameCn"].ToString().Trim(), dr["picn"].ToString().Trim(), dr["picurl"].ToString().Trim()));
            }
        }
예제 #4
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 });
 }
예제 #5
0
        public SheJiDianPicList()
        {
            DataTable dt = SQLmtm.GetDataTable("SELECT\n" +
                                               " a.DESIGN_ID id,\n" +
                                               " a.STYLE_CATEGORY_CD styleCategoryCD,\n" +
                                               " a.FILE_ID fileID,\n" +
                                               " a.ITEM_CD itemCode,\n" +
                                               " a.ITEM_VALUE itemValue,\n" +
                                               " a.ITEM_NAME_CN itemNameCn,\n" +
                                               " CONCAT( file.FILE_PATH, file.UPLOAD_FILE ) \"picurl\",\n" +
                                               "  file.UPLOAD_FILE \"picn\",\n" +
                                               " a.ITEM_NAME_EN itemNameEN,\n" +
                                               " a.ITEM_NAME_JP itemNameJP,\n" +
                                               " IFNULL( a.ITEM_COST, 0 ) itemCost,\n" +
                                               " a.REMARKS remarks,\n" +
                                               " a.ENABLE_FLAG enableFlag,\n" +
                                               " a.DELETE_FLAG deleteFlag,\n" +
                                               " a.HAVETO_FLAG haveToFlag,\n" +
                                               " a.VERSION version,\n" +
                                               " a.CREATE_DATE createDate,\n" +
                                               " a.CREATE_USER \"createBy.id\",\n" +
                                               " a.UPDATE_USER \"updateBy.id\",\n" +
                                               " a.ITEM_SORT itemSort,\n" +
                                               " a.ITEM_CATEGORY_CD itemCategoryCD,\n" +
                                               " file.FILE_ID \"uploadFile.fileId\",\n" +
                                               " file.FILE_SOURCE \"uploadFile.fileSource\",\n" +
                                               " file.MODULE_KBN \"uploadFile.moduleKbn\",\n" +
                                               " file.FTP_FILE \"uploadFile.ftpFile\",\n" +
                                               " file.FILE_PATH \"uploadFile.filePath\",\n" +
                                               " CONCAT( p.FIRST_NAME, p.LAST_NAME ) \"updateBy.firstName\" \n" +
                                               "FROM\n" +
                                               " a_designoption_p a\n" +
                                               " LEFT JOIN a_login_user_p p ON a.UPDATE_USER = p.login_user_id\n" +
                                               " LEFT JOIN w_upload_file_p file ON a.FILE_ID = file.FILE_ID \n" +
                                               " LEFT JOIN a_ognization_desgin_r adr ON a.DESIGN_ID = adr.DESGIN_ID \n" +
                                               "WHERE\n" +
                                               " a.STYLE_CATEGORY_CD = 'STYLE_CATEGORY-SHIRT' and a.DESIGN_ID IN ( SELECT DESGIN_ID FROM a_shop_desgin_r WHERE SHOP_ID = 18 ) \n" +
                                               " \n" +
                                               " AND a.DELETE_FLAG = 0 \n" +
                                               " AND adr.OGNIZATION_ID = 95 \n" +
                                               "ORDER BY\n" +
                                               " a.item_sort,\n" +
                                               " a.UPDATE_DATE DESC");

            foreach (DataRow dr in dt.Rows)
            {
                String picurl = dr["picurl"].ToString().Trim();
                if (picurl != "")
                {
                    picurl = "https://shirtmtm.com" + picurl;
                }
                this.shejidianpiclist.Add(new SheJiDianPic(dr["itemCode"].ToString().Trim(), dr["itemValue"].ToString().Trim(), dr["itemNameCn"].ToString().Trim(), dr["picn"].ToString().Trim(), picurl));
            }
        }
예제 #6
0
        private void initCombobox()
        {
            DataTable dt = SQLmtm.GetDataTable("SELECT * FROM a_sys_area WHERE PARENT_CODE='7'");

            if (dt != null)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    this.shengfen.Items.Add(Convert.ToString(dr["TREE_PATH"]));
                }
            }
        }
예제 #7
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" });
                }
            }
        }
예제 #8
0
        public StylePicList()
        {
            DataTable dt = SQLmtm.GetDataTable("SELECT\n" +
                                               " style.SYS_STYLE_ID AS styleId,\n" +
                                               " style.STYLE_CD \"styleEntity.styleCd\",\n" +
                                               " style.STYLE_NAME_CN \"styleEntity.styleNameCn\",\n" +
                                               " style.STYLE_CATEGORY_CD \"styleEntity.styleCategoryCd\",\n" +
                                               " style.STYLE_DRESS_CATEGORY \"styleEntity.styleDressCategory\",\n" +
                                               " style.STYLE_DESIGN_TYPE \"styleEntity.styleDesignType\",\n" +
                                               " style.STYLE_PUBLISH_CATEGORY_CD \"styleEntity.stylePublishCategoryCd\",\n" +
                                               " style.SYTLE_YEAR \"styleEntity.sytleYear\",\n" +
                                               " style.SYTLE_SEASON \"styleEntity.sytleSeason\",\n" +
                                               " style.STYLE_FIT_CD \"styleEntity.styleFitCd\",\n" +
                                               " material.MATERIAL_NAME_CN AS \"materialEntity.materialNameCn\",\n" +
                                               " material.MATERIAL_NAME_EN AS \"materialEntity.materialNameEn\",\n" +
                                               " material.material_id \"materialEntity.id\",\n" +
                                               " GROUP_CONCAT( DISTINCT material.MATERIAL_CODE ) \"materialEntity.materialCode\",\n" +
                                               " style.VERSION,\n" +
                                               " style.CREATE_USER,\n" +
                                               " style.STYLE_MAKE_TYPE \"styleEntity.styleMakeType\",\n" +
                                               " style.STYLE_SIZE_GROUP_CD \"styleEntity.styleSizeGroupCd\",\n" +
                                               " style.STYLE_SIZE_CD \"styleEntity.styleSizeCd\",\n" +
                                               " style.STYLE_FIT_BODY_TYPE \"styleEntity.styleFitBodyType\",\n" +
                                               " CONCAT( login_user.FIRST_NAME, login_user.LAST_NAME ) \"user.loginName\",\n" +
                                               " style.CREATE_DATE,\n" +
                                               " style.COVER_PHOTO_PATH \"styleEntity.coverPhotoPath\",\n" +
                                               " SUBSTRING_INDEX(style.COVER_PHOTO_PATH,'/',-1) AS picn,\n" +
                                               " CONCAT('https://sshirtmtmbucket.oss-cn-zhangjiakou.aliyuncs.com/sshirtmtm/',SUBSTRING_INDEX(style.COVER_PHOTO_PATH,'/',-1)) AS picurl   \n" +
                                               "FROM\n" +
                                               " s_style_p style\n" +
                                               " LEFT JOIN i_material_p material ON FIND_IN_SET( CAST( material.MATERIAL_ID AS CHAR ), style.SYTLE_FABRIC_ID )\n" +
                                               " LEFT JOIN a_login_user_p login_user ON login_user.LOGIN_USER_ID = style.CREATE_USER \n" +
                                               "WHERE\n" +
                                               " style.DELETE_FLAG = 0 \n" +
                                               " AND style.STYLE_NAME_CN IS NOT NULL \n" +
                                               "   AND style.STYLE_KBN != 'STYLE_SOURCE-STYLE_SOURCE_50' \n" +
                                               " AND ( style.SHOP_ID = 18 OR style.SHOP_ID = 0 ) \n" +
                                               "GROUP BY\n" +
                                               " style.SYS_STYLE_ID \n" +
                                               "ORDER BY\n" +
                                               " style.UPDATE_DATE DESC \n" +
                                               " -- LIMIT 50");

            foreach (DataRow dr in dt.Rows)
            {
                //StylePic sp = new StylePic(dr["styleId"].ToString().Trim(), dr["styleEntity.styleCd"].ToString().Trim(), dr["picn"].ToString().Trim(), dr["picurl"].ToString().Trim());
                this.stylepiclist.Add(new StylePic(dr["styleId"].ToString().Trim(), dr["styleEntity.styleCd"].ToString().Trim(), dr["picn"].ToString().Trim(), dr["picurl"].ToString().Trim()));
            }
        }
예제 #9
0
 /// <summary>
 /// 保存尺寸a_customer_fit_value_r,s_style_fit_r插入数据
 /// </summary>
 /// <param name="sTYLE_FIT_ID"></param>
 /// <param name="customername"></param>
 /// <param name="fitv"></param>
 /// <param name="ftvl"></param>
 /// <param name="inftvl"></param>
 /// <param name="outftvl"></param>
 public static void insertFit_R(int sTYLE_FIT_ID, string customername, Fit_ValueDTo fitv, String ftvl, String inftvl, String outftvl)
 {
     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,
                                    "SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_LENGT002,SHIRT_LENGT002,SHIRT_LENGT002,SHIRT_LENGT002,SHIRT_LENGT002,SHIRT_LENGT002,SHIRT_POSTU003,SHIRT_POSTU003,SHIRT_POSTU003,SHIRT_POSTU003,",
                                    "CIRCU_ITEM_01,CIRCU_ITEM_02,CIRCU_ITEM_03,CIRCU_ITEM_04,CIRCU_ITEM_05,CIRCU_ITEM_06,CIRCU_ITEM_07,LENGT_ITEM_08,CIRCU_ITEM_08,CIRCU_ITEM_18,CIRCU_ITEM_17,LENGT_ITEM_01,LENGT_ITEM_02,POSTU_ITEM_09,POSTU_ITEM_07,LENGT_ITEM_05,LENGT_ITEM_06,POSTU_ITEM_01,POSTU_ITEM_02,CIRCU_ITEM_21,CIRCU_ITEM_19,",
                                    ftvl, "CIRCU_ITEM_01,CIRCU_ITEM_02,CIRCU_ITEM_03,CIRCU_ITEM_04,CIRCU_ITEM_05,CIRCU_ITEM_06,CIRCU_ITEM_07,LENGT_ITEM_08,CIRCU_ITEM_08,CIRCU_ITEM_18,CIRCU_ITEM_17,LENGT_ITEM_01,LENGT_ITEM_02,POSTU_ITEM_09,POSTU_ITEM_07,LENGT_ITEM_05,LENGT_ITEM_06,POSTU_ITEM_01,POSTU_ITEM_02,CIRCU_ITEM_21,CIRCU_ITEM_19,",
                                    inftvl, outftvl, "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", "SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_CIRCU001,SHIRT_LENGT002,SHIRT_LENGT002,SHIRT_LENGT002,SHIRT_LENGT002,SHIRT_LENGT002,SHIRT_LENGT002,SHIRT_POSTU003,SHIRT_POSTU003,SHIRT_POSTU003,SHIRT_POSTU003",
                                    "CIRCU_ITEM_01,CIRCU_ITEM_02,CIRCU_ITEM_03,CIRCU_ITEM_04,CIRCU_ITEM_05,CIRCU_ITEM_06,CIRCU_ITEM_07,LENGT_ITEM_08,CIRCU_ITEM_08,CIRCU_ITEM_18,CIRCU_ITEM_17,LENGT_ITEM_01,LENGT_ITEM_02,POSTU_ITEM_09,POSTU_ITEM_07,LENGT_ITEM_05,LENGT_ITEM_06,POSTU_ITEM_01,POSTU_ITEM_02,CIRCU_ITEM_21,CIRCU_ITEM_19",
                                    ftvl, "CIRCU_ITEM_01,CIRCU_ITEM_02,CIRCU_ITEM_03,CIRCU_ITEM_04,CIRCU_ITEM_05,CIRCU_ITEM_06,CIRCU_ITEM_07,LENGT_ITEM_08,CIRCU_ITEM_08,CIRCU_ITEM_18,CIRCU_ITEM_17,LENGT_ITEM_01,LENGT_ITEM_02,POSTU_ITEM_09,POSTU_ITEM_07,LENGT_ITEM_05,LENGT_ITEM_06,POSTU_ITEM_01,POSTU_ITEM_02,CIRCU_ITEM_21,CIRCU_ITEM_19",
                                    "0", "1", "46", inftvl, outftvl });
 }
예제 #10
0
        /// <summary>
        /// 标准款尺寸保存
        /// </summary>
        /// <param name="dt"></param>
        public static void StandardModelsSizeSive(DataTable dt)
        {
            Fit_ValueDTo fitv = new Fit_ValueDTo();

            foreach (DataRow dr in dt.Rows)
            {
                fitv.icadd(dr["ITEM_CD"].ToString());
                fitv.ivadd(dr["ITEM_VALUE"].ToString());
                fitv.fvadd(dr["ITEM_FIT_VALUE"].ToString());
                fitv.fmvadd(dr["ITEM_VALUE"].ToString());
                fitv.invadd("0");
                fitv.outvadd("0");
            }
            SQLmtm.DoInsert("a_customer_fit_value_r", new string[] { "CUSTOMER_ID", "CUSTOMER_NAME", "ITEM_CD", "ITEM_VALUE", "FIT_VALUE", "FM_VALUE", "IN_VALUE", "OUT_VALUE", "STATUS", "DELETE_FLAG", "CUSTOMER_COUNT_ID" }, new string[] { Frm客户.cUSTOMER_ID.ToString(), Frm客户.customer_name, 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 });
        }
예제 #11
0
        private void 已付款ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int     handle = this.gridView1.FocusedRowHandle;
            DataRow dr     = this.gridView1.GetDataRow(handle);
            int     i      = SQLmtm.DoUpdate("o_order_p", new string[] { "ORDER_STATUS_CD" }, new string[] { "ORDER_STATUS-OS_13" }, new string[] { "ORDER_ID" }, new string[] { dr["ORDER_ID"].ToString() });

            //DBUtil.DoUpdate("chunshan_dingdan_bill_________new", new string[] { "dingdanzhuangtai" }, new string[] { "已付款" }, new string[] { "id" }, new string[] { Convert.ToString(dr["id"]) });
            if (i == 1)
            {
                MessageBox.Show("修改成功");
            }
            else
            {
                MessageBox.Show("修改失败");
            }
            RefreshGridcontrol();
        }
예제 #12
0
        private void gridView1_MouseDown(object sender, MouseEventArgs e)
        {
            try
            {
                //DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo hInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));
                if (e.Button == MouseButtons.Left && e.Clicks == 2)//判断是否左键双击
                {
                                    {
                        ////判断光标是否在行范围内
                        //if (hInfo.InRow)
                        //{
                        DataRow dr;
                        int     handle = this.gridView1.FocusedRowHandle;

                        dr = this.gridView1.GetDataRow(handle);
                        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 ='" + Convert.ToInt32(dr["ID"]) + "' AND DEFAULT_FLAG ='1') s2 on s1.FIT_COUNT_ID=s2.ID");

                        if (dt.Rows[0]["CUSTOMER_FIT_ID"].ToString() != "")
                        {
                            CreateCustomer.customer_name = dr["客户姓名"].ToString();
                            CreateCustomer.cUSTOMER_ID   = Convert.ToInt32(dr["ID"]);
                            DataRow drr = SQLmtm.GetDataRow("SELECT * FROM `a_customer_fit_count_r` WHERE CUSTOMER_ID='" + CreateCustomer.cUSTOMER_ID.ToString() + "' AND DEFAULT_FLAG=1");
                            DataRow ddr = SQLmtm.GetDataRow("SELECT * FROM `a_customer_address_p` WHERE DEFAULT_ADDR_FLAG=1 AND CUSTOMER_ID='" + CreateCustomer.cUSTOMER_ID.ToString() + "'");
                            if (drr == null || ddr == null)
                            {
                                MessageBox.Show("缺少客户信息");
                                return;
                            }
                            CreateCustomer.customer_countid = Convert.ToInt32(drr["ID"]);
                            CreateCustomer.aDDRESS_ID       = Convert.ToInt32(ddr["ADDRESS_ID"]);
                            this.Close();
                        }
                        else
                        {
                            MessageBox.Show("选择的客户未建立量体值");
                        }
                        //写双击后需要执行的程序
                        //}
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("error");
            }
        }
예제 #13
0
 private void chengshi_TextChanged(object sender, EventArgs e)
 {
     this.qvyv.Items.Clear();
     try
     {
         DataTable dt = SQLmtm.GetDataTable("SELECT a1.AREA_ID,a2.PARENT_CODE,a1.AREA_NAME AS chengshi,a2.AREA_NAME AS qvyv FROM (SELECT * FROM a_sys_area  WHERE AREA_NAME='" + this.chengshi.Text + "')AS a1 LEFT JOIN a_sys_area a2 ON a1.AREA_ID=a2.PARENT_CODE ;");
         if (dt != null)
         {
             foreach (DataRow dr in dt.Rows)
             {
                 this.qvyv.Items.Add(Convert.ToString(dr["qvyv"]));
             }
         }
     }
     catch
     {
     }
 }
예제 #14
0
        public static DataRow GetDataFromStyleid(String id)
        {
            String sql = "SELECT ";

            sql = sql + "sp.SYS_STYLE_ID, ";
            sql = sql + "sp.STYLE_NAME_CN, ";
            sql = sql + "imp.MATERIAL_CODE, ";
            sql = sql + "imp.MATERIAL_COMPOSITION, ";
            sql = sql + "sp.STYLE_SHOP_TOTAL_PRICE, ";
            sql = sql + "sp.STYLE_FIT_CD, ";
            sql = sql + "sp.STYLE_CATEGORY_CD, ";
            sql = sql + "sp.STYLE_SIZE_GROUP_CD ";
            sql = sql + "FROM ";
            sql = sql + "s_style_p AS sp ";
            sql = sql + "LEFT JOIN i_material_p imp ON sp.SYTLE_FABRIC_ID = imp.MATERIAL_ID ";
            sql = sql + "WHERE ";
            sql = sql + "sp.SYS_STYLE_ID = '" + id + "';";
            return(SQLmtm.GetDataRow(sql));
        }
예제 #15
0
 /// <summary>
 /// 标准款设计点保存
 /// </summary>
 public static void StandardModelsDesignSive()
 {
     try
     {
         String    sql = "SELECT * FROM s_style_option_r WHERE SYS_STYLE_ID='" + Frm定制下单修改尺寸.kuanshiid + "'";
         DataTable dt  = SQLmtm.GetDataTable(sql);
         foreach (DataRow dr in dt.Rows)
         {
             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(), dr["ITEM_CD"].ToString(), dr["ITEM_VALUE"].ToString(), dr["OPTION_VALUE"].ToString(), "1", "0" }
                 );
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("错误信息: " + ex.Message);
         return;
     }
 }
예제 #16
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 });
        }
예제 #17
0
        private void searchLookUpEdit1View_Click(object sender, EventArgs e)
        {
            var a = this.searchLookUpEdit1.Properties.View.GetSelectedRows();

            foreach (int rowHandle in a)
            {
                Frm客户.cUSTOMER_ID                                                                                          //  no
                    = Convert.ToInt32(this.searchLookUpEdit1.Properties.View.GetRowCellValue(rowHandle, "ID").ToString()); //id 是 Value Member
                Frm客户.customer_name                                                                                        //  no
                    = this.searchLookUpEdit1.Properties.View.GetRowCellValue(rowHandle, "客户姓名").ToString();                //id 是 Value Member
            }
            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 ='" + Frm客户.cUSTOMER_ID + "' AND DEFAULT_FLAG ='1') s2 on s1.FIT_COUNT_ID=s2.ID");

            if (dt.Rows.Count != 0)
            {
                DataRow drr = SQLmtm.GetDataRow("SELECT * FROM `a_customer_fit_count_r` WHERE CUSTOMER_ID='" + Frm客户.cUSTOMER_ID.ToString() + "' AND DEFAULT_FLAG=1");
                DataRow ddr = SQLmtm.GetDataRow("SELECT * FROM `a_customer_address_p` WHERE DEFAULT_ADDR_FLAG=1 AND CUSTOMER_ID='" + Frm客户.cUSTOMER_ID.ToString() + "'");
                if (drr == null || ddr == null)
                {
                    Frm客户.cUSTOMER_ID   = 0;
                    Frm客户.customer_name = "";
                    MessageBox.Show("缺少客户信息");
                    return;
                }
                Frm客户.customer_countid = Convert.ToInt32(drr["ID"]);
                Frm客户.aDDRESS_ID       = Convert.ToInt32(ddr["ADDRESS_ID"]);
            }
            else
            {
                Frm客户.cUSTOMER_ID   = 0;
                Frm客户.customer_name = "";
                MessageBox.Show("选择的客户未建立量体值");
                return;
            }
            this.gridControl2.DataSource = CustomerService.GetCustomerInformation(Frm客户.cUSTOMER_ID);
        }
예제 #18
0
        public MianLiaoPicList()
        {
            String sql = "SELECT\n" +
                         "*,CONCAT(s1.materialCode,':',s1.materialNameCn) AS mianliao,\n" +
                         "SUBSTRING_INDEX( s1.filePath, '/',- 1 ) AS picn,\n" +
                         "CONCAT( 'https://sshirtmtmbucket.oss-cn-zhangjiakou.aliyuncs.com/sshirtmtm/', SUBSTRING_INDEX( s1.filePath, '/',- 1 ) ) AS picurl \n" +
                         "FROM\n" +
                         "(\n" +
                         "SELECT\n" +
                         "	a.material_id AS \"id\",\n"+
                         "	a.material_file_id AS \"fileId\",\n"+
                         "	a.material_name_cn AS \"materialNameCn\",\n"+
                         "	a.material_name_en AS \"materialNameEn\",\n"+
                         "	a.material_code AS \"materialCode\",\n"+
                         "	a.material_use_type AS \"materialUseType\",\n"+
                         "	a.material_type_cd AS \"materialTypeCd\",\n"+
                         "	a.material_composition AS \"materialComposition\",\n"+
                         "	a.material_spec AS \"materialSpec\",\n"+
                         "	a.material_unit_cd AS \"materialUnitCd\",\n"+
                         "	a.material_year AS \"materialYear\",\n"+
                         "	a.material_color AS \"materialColor\",\n"+
                         "	a.material_season AS \"materialSeason\",\n"+
                         "	a.remarks AS \"remarks\",\n"+
                         "	a.material_category AS \"materialStyleCategory\",\n"+
                         "	a.model_filepath AS \"modelFilepath\",\n"+
                         "CASE\n" +
                         "		\n"+
                         "		WHEN file.FILE_PATH IS NOT NULL \n"+
                         "		AND file.FILE_PATH != '' THEN\n"+
                         "			REPLACE ( CONCAT( file.FILE_PATH, file.UPLOAD_FILE ), 'fragsmart-erp', 'fragsmart-mtm' ) ELSE REPLACE ( CONCAT( upload_file.FILE_PATH, upload_file.UPLOAD_FILE ), 'fragsmart-erp', 'fragsmart-mtm' ) \n"+
                         "			END AS filePath,\n"+
                         "		a_login_user_p.LAST_NAME AS \"createby.lastName\",\n"+
                         "		a_login_user_p.FIRST_NAME AS \"createby.firstName\",\n"+
                         "		IFNULL( s.material_sale_price, 0 ) AS \"materialPrice.materialSalePrice\",\n"+
                         "		IFNULL( inventory_material.MATERIAL_QUANTITY, 0 ) AS \"inventoryMaterial.materialQuantity\",\n"+
                         "		a.MATERIAL_LEVEL AS \"materialLevel\",\n"+
                         "		a.MATERIAL_STYLE AS \"materialStyle\",\n"+
                         "		a.MATERIAL_WEAVE AS \"materialWeave\",\n"+
                         "	CASE\n"+
                         "			\n"+
                         "			WHEN adp.ITEM_VALUE = \"A_150\" THEN\n"+
                         "			150 \n"+
                         "			WHEN adp.ITEM_VALUE = \"B_180\" THEN\n"+
                         "			180 \n"+
                         "			WHEN adp.ITEM_VALUE = \"C_240\" THEN\n"+
                         "			240 \n"+
                         "			WHEN adp.ITEM_VALUE = \"D_320\" THEN\n"+
                         "			320 ELSE 0 \n"+
                         "		END AS \"materiaFacPrice\" \n"+
                         "	FROM\n"+
                         "		i_material_p a\n"+
                         "		LEFT JOIN a_shop_material_r ar ON a.MATERIAL_ID = ar.MATERIAL_ID\n"+
                         "		LEFT JOIN a_login_user_p a_login_user_p ON a_login_user_p.login_user_id = a.create_user\n"+
                         "		LEFT JOIN i_material_price_s s ON s.material_id = a.material_id \n"+
                         "		AND s.SHOP_ID = 18\n"+
                         "		INNER JOIN i_inventory_material_p inventory_material ON inventory_material.material_id = a.material_id\n"+
                         "		LEFT JOIN w_upload_file_p file ON a.material_file_id = file.FILE_ID \n"+
                         "		AND file.FTP_FILE = \"/material\"\n"+
                         "		LEFT JOIN a_upload_file_p upload_file ON upload_file.FILE_ID = a.MATERIAL_FILE_ID \n"+
                         "		AND upload_file.FILE_KBN = 0 \n"+
                         "		AND upload_file.FTP_FILE = \"/material\"\n"+
                         "		LEFT JOIN a_dict_p adp ON a.MATERIAL_LEVEL = CONCAT( adp.ITEM_CD, \"-\", adp.ITEM_VALUE ) \n"+
                         "	WHERE\n"+
                         "		a.delete_flag = 0 \n"+
                         "		AND a.material_category IN ( 'MATERIAL_CATEGORY-Fabric', 'MATERIAL_CATEGORY-ButtonL', 'MATERIAL_CATEGORY-Suit_Fabric', 'MATERIAL_CATEGORY-Suit_Material' ) \n"+
                         "		AND ar.SHOP_ID = 18 \n"+
                         "		AND ( a.material_name_cn LIKE '%%' OR a.material_code LIKE '%%' ) \n"+
                         "    AND a.material_category ='MATERIAL_CATEGORY-Fabric'\n" +
                         "	ORDER BY\n"+
                         "		a.MATERIAL_CATEGORY,\n"+
                         "		a.MATERIAL_ID \n"+
                         "	-- LIMIT 50 \n"+
                         ") AS s1";
            DataTable dt = SQLmtm.GetDataTable(sql);

            foreach (DataRow dr in dt.Rows)
            {
                this.mianliaopiclist.Add(new MianLiaoPic(dr["materialNameCn"].ToString().Trim(), dr["id"].ToString().Trim(), dr["materialCode"].ToString().Trim(), dr["picn"].ToString().Trim(), dr["picurl"].ToString().Trim()));
            }
        }
예제 #19
0
        /// <summary>
        /// 刷新gridcontrol
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Index_Activated(object sender, EventArgs e)
        {
            this.dangqiankehu.Text = CreateCustomer.customer_name;
            //DataTable dt = DBUtil.ExecuteDataTable("SELECT chunshan_dingdanyvlan.id, mingcheng, shuliang FROM chunshan_dingdanyvlan LEFT JOIN chunshan_kuanshibiao on chunshan_dingdanyvlan.kuanshiid = chunshan_kuanshibiao.id LEFT JOIN chunshan_mianliao on chunshan_dingdanyvlan.mianliaoid = chunshan_mianliao.id");
            //DataTable dt = DBUtil.ExecuteDataTable("SELECT chunshan_kuanshibiao.mingcheng,chunshan_mianliaozidian.mianliaomingcheng,shuliang FROM chunshan_dingdanyvlan LEFT JOIN chunshan_kuanshibiao on chunshan_dingdanyvlan.kuanshiid=chunshan_kuanshibiao.kuanhao LEFT JOIN chunshan_mianliaozidian on chunshan_dingdanyvlan.mianliaoid=chunshan_mianliaozidian.mianliaoid");
            //dt.Columns["mingcheng"].ColumnName = "款式";
            //dt.Columns["mianliaomingcheng"].ColumnName = "面料";
            //dt.Columns["shuliang"].ColumnName = "数量";
            try
            {
                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 ='" + CreateCustomer.cUSTOMER_ID + "' 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")
                    {
                        this.kehushengao.Text = dr["FIT_VALUE"].ToString();
                    }
                    if (dr["ITEM_VALUE"].ToString() == "FITMT_ITEM_10")
                    {
                        this.kehutizhong.Text = dr["FIT_VALUE"].ToString();
                    }
                    if (dr["ITEM_VALUE"].ToString() == "FITMT_CODE_01")
                    {
                        switch (dr["FIT_VALUE"].ToString())
                        {
                        case "1":
                            this.kehujianxing.Text = "平肩";
                            break;

                        case "2":
                            this.kehujianxing.Text = "溜肩";
                            break;

                        case "3":
                            this.kehujianxing.Text = "正常";
                            break;
                        }
                    }
                    if (dr["ITEM_VALUE"].ToString() == "FITMT_CODE_02")
                    {
                        switch (dr["FIT_VALUE"].ToString())
                        {
                        case "4":
                            this.kehuduxing.Text = "凹陷";
                            break;

                        case "5":
                            this.kehuduxing.Text = "平坦";
                            break;

                        case "6":
                            this.kehuduxing.Text = "微凸";
                            break;

                        case "7":
                            this.kehuduxing.Text = "中凸";
                            break;

                        case "8":
                            this.kehuduxing.Text = "重凸";
                            break;
                        }
                        //this.kehuduxing.Text = dr["FIT_VALUE"].ToString();
                    }
                }
                //}
                //else
                //{
                //    MessageBox.Show("未建立量体值");
                //}
            }
            catch
            {
            }

            /*
             * DataTable dt = DBUtil.ExecuteDataTable("SELECT ksb.mingcheng AS 款式, ml.mianliaomingcheng AS 面料, lz.shejidianmingcheng AS 领型, xt.shejidianmingcheng AS 袖头, cx.shejidianmingcheng AS 刺绣颜色 , ql.shejidianmingcheng AS 前立, yl.shuliang as 数量 FROM chunshan_dingdanyvlan yl LEFT JOIN ( SELECT * FROM chunshan_shejidianzidian lz WHERE lz.shejidianleixing = '领型' ) lz ON yl.lingziid = lz.shejidianid LEFT JOIN ( SELECT * FROM chunshan_shejidianzidian xt WHERE xt.shejidianleixing = '袖头' ) xt ON yl.xiutouid = xt.shejidianid LEFT JOIN ( SELECT * FROM chunshan_shejidianzidian cx WHERE cx.shejidianleixing = '刺绣颜色' ) cx ON yl.cixiuyanseid = cx.shejidianid LEFT JOIN ( SELECT * FROM chunshan_shejidianzidian ql WHERE ql.shejidianleixing = '前立' ) ql ON yl.qianliid = ql.shejidianid LEFT JOIN chunshan_kuanshibiao ksb ON yl.kuanshiid = ksb.kuanhao LEFT JOIN chunshan_mianliaozidian ml ON yl.mianliaoid = ml.mianliaoid");
             * this.gridControl1.DataSource = dt;
             * this.gridControl1.Refresh();
             */
            //RefreshGridcontrol();

            //MessageBox.Show("刷新成功");
        }
예제 #20
0
        /// <summary>
        /// 显示所有
        /// </summary>
        private void DoButtonClick()
        {
            this.splashScreenManager1.ShowWaitForm();
            this.splashScreenManager1.SetWaitFormCaption("请稍后,正在加载中....");        // 标题
            this.splashScreenManager1.SetWaitFormDescription("正在初始化.....");       // 信息
            DataTable dt = SQLmtm.GetDataTable("SELECT\n" +
                                               "	s1.itemValue ,\n"+
                                               "	s1.itemNameCn ,\n"+
                                               "S2.UPLOAD_FILE AS picn,\n" +
                                               "	s2.picurl \n"+
                                               "FROM\n" +
                                               "	(\n"+
                                               "	SELECT\n"+
                                               "		ap.ITEM_VALUE itemValue,\n"+
                                               "		ap.DESIGN_ID id,\n"+
                                               "		CONCAT( ap.ITEM_VALUE, \":\", ap.ITEM_NAME_CN ) itemNameCn,\n"+
                                               "		ap.ITEM_CD itemCode,\n"+
                                               "		adp.ITEM_CD itemParentCode \n"+
                                               "	FROM\n"+
                                               "		a_designoption_p ap\n"+
                                               "		LEFT JOIN a_designoption_p adp ON adp.ITEM_VALUE = ap.ITEM_CD\n"+
                                               "		LEFT JOIN a_ognization_desgin_r adr ON ap.DESIGN_ID = adr.DESGIN_ID \n"+
                                               "	WHERE\n"+
                                               "		( ap.ITEM_CATEGORY_CD = \"\" OR ap.ITEM_CATEGORY_CD IS NULL ) \n"+
                                               "		AND ap.STYLE_CATEGORY_CD = 'STYLE_CATEGORY-SHIRT' \n"+
                                               "		AND ap.ITEM_CD = '4HYS' -- AND ap.ITEM_CD IN ( SELECT ap.ITEM_VALUE itemValue FROM a_designoption_p ap WHERE ap.ITEM_CATEGORY_CD ='ITEM_TYPE_CD-10' )\n"+
                                               "		\n"+
                                               "		AND adr.OGNIZATION_ID = 95 \n"+
                                               "		AND ap.ITEM_VALUE IN (\n"+
                                               "		SELECT\n"+
                                               "			ap.ITEM_VALUE itemValue \n"+
                                               "		FROM\n"+
                                               "			a_designoption_p ap \n"+
                                               "		WHERE\n"+
                                               "			ap.DESIGN_ID IN ( SELECT ar.DESGIN_ID FROM a_shop_desgin_r ar WHERE ar.SHOP_ID = 18 ) \n"+
                                               "		) \n"+
                                               "	ORDER BY\n"+
                                               "		ap.ITEM_CD,\n"+
                                               "		ap.ITEM_SORT ASC \n"+
                                               "	) AS s1\n"+
                                               "	LEFT JOIN (\n"+
                                               "	SELECT\n"+
                                               "		a.ITEM_CD,\n"+
                                               "		a.ITEM_VALUE,\n"+
                                               "		a.ITEM_NAME_CN,\n"+
                                               "		CONCAT( 'https://sshirtmtmbucket.oss-cn-zhangjiakou.aliyuncs.com/sshirtmtm/', w.UPLOAD_FILE ) AS picurl,\n"+
                                               "		w.* \n"+
                                               "	FROM\n"+
                                               "		a_designoption_p a\n"+
                                               "		LEFT JOIN w_upload_file_p w ON a.FILE_ID = w.FILE_ID \n"+
                                               "	WHERE\n"+
                                               "		a.FILE_ID IS NOT NULL \n"+
                                               "	) AS s2 ON s1.itemCode = s2.ITEM_CD \n"+
                                               "	AND s1.itemValue = s2.ITEM_VALUE");

            this.panel1.Controls.Clear();
            height = 0;
            width  = 0;
            int i = 0;

            panelLocition = new PanelLocition(this.panel1.Width, this.panel1.Height, dt.Rows.Count);
            foreach (DataRow dr in dt.Rows)
            {
                HouYaoShengCard oc = new HouYaoShengCard(this);
                oc.label1.Text   = dr["itemNameCn"].ToString();
                oc.houyaosheng   = dr["itemNameCn"].ToString();
                oc.houyaoshengid = dr["itemValue"].ToString();
                oc.picurl        = dr["picurl"].ToString();
                try
                {
                    oc.pictureBox1.Image = Image.FromFile(@"pic\" + dr["picn"].ToString().Trim());
                }
                catch
                {
                }
                this.generateUserControl(oc, i);
                this.panel1.Controls.Add(oc);//将控件加入panel
                //oc.pictureBox1.Click += new EventHandler(this.picture_Click);
                i++;
            }
            this.splashScreenManager1.CloseWaitForm();
        }
예제 #21
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (this.shengao.Text == "" || this.tizhong.Text == "" || this.tixing.Text == "" || this.jianxing.Text == "" || this.fuxing.Text == "" || this.tunxing.Text == "")
            {
                MessageBox.Show("请填写完整");
                return;
            }
            this.customerZero();
            customer_name = this.xing.Text + this.ming.Text;

            if (this.sex.Text == "男")
            {
                sEX_CD = "SEX-M_10";
                sexno  = "0";
            }
            else
            {
                sEX_CD = "SEX-W_20";
                sexno  = "1";
            }
            DataRow dr_customerid = SQLmtm.GetDataRow("SELECT MAX(CUSTOMER_ID) AS CUSTOMER_ID FROM a_customer_p ");

            cUSTOMER_ID = Convert.ToInt32(dr_customerid["CUSTOMER_ID"]);
            cUSTOMER_ID++;
            int i1 = SQLmtm.DoInsert("a_customer_p", new string[] { "CUSTOMER_ID", "CUSTOMER_FIRST_NAME", "CUSTOMER_LAST_NAME", "MOBILE", "DEFAULT_ADDR_FLAG", "SEX_CD", "E_MAIL_URL", "DELETE_FLAG", "VERSION", "CUSTOMER_STATUS" },
                                     new string[] { cUSTOMER_ID.ToString(), this.xing.Text, this.ming.Text, this.shouji.Text, "0", sEX_CD, this.eml.Text, "0", "1", "CUSTOMER_SOURCE-CS_SHOP" });

            if (i1 != 1)
            {
                MessageBox.Show("保存失败");
            }

            //a_customer_fit_count_r
            int i14 = SQLmtm.DoInsert("a_customer_fit_count_r", new string[] { "CUSTOMER_ID", "CUSTOMER_NAME", "SEX", "AGE", "CREATE_DATE", "DELETE_FLAG", "DEFAULT_FLAG", "DATA_COMPLETE" },
                                      new string[] { cUSTOMER_ID.ToString(), customer_name, sexno, this.nianling.Text, DateTime.Now.ToUniversalTime().ToString(), "0", "1", "1" });
            DataRow dr_customer_countid = SQLmtm.GetDataRow("SELECT MAX(ID) AS ID FROM a_customer_fit_count_r");

            customer_countid = Convert.ToInt32(dr_customer_countid["ID"]);
            if (i14 != 1)
            {
                MessageBox.Show("保存失败");
            }

            //门店客户表
            int i2 = SQLmtm.DoInsert("a_shop_customer_r", new string[] { "SHOP_CUSTOMER_ID", "SHOP_ID", "CUSTOMER_ID" }, new string[] { (cUSTOMER_ID - 1).ToString(), "18", cUSTOMER_ID.ToString() });

            ////取量体id
            //DataRow dr_customerfitid = SQLmtm.GetDataRow("SELECT MAX(CUSTOMER_FIT_ID) AS CUSTOMER_FIT_ID FROM a_customer_fit_r");
            //cUSTOMER_FIT_ID = Convert.ToInt32(dr_customerfitid["CUSTOMER_FIT_ID"]);
            //cUSTOMER_FIT_ID++;
            if (i2 != 1)
            {
                MessageBox.Show("保存失败");
            }
            //身高
            int i3 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                     new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_09", "0", this.shengao.Text, customer_countid.ToString() });

            if (i3 != 1)
            {
                MessageBox.Show("保存失败");
            }

            //体重
            int i4 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                     new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_10", "0", this.tizhong.Text, customer_countid.ToString() });

            //cUSTOMER_FIT_ID++;
            if (i4 != 1)
            {
                MessageBox.Show("保存失败");
            }

            //肩宽CODE
            int i5 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                     new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_05", "0", this.jiankuan.Text, customer_countid.ToString() });

            //cUSTOMER_FIT_ID++;
            if (i5 != 1)
            {
                MessageBox.Show("保存失败");
            }

            //胸围CODE
            int i6 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                     new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_02", "0", this.xiongwei.Text, customer_countid.ToString() });

            //cUSTOMER_FIT_ID++;
            if (i6 != 1)
            {
                MessageBox.Show("保存失败");
            }

            //腰围CODE
            int i7 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                     new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_12", "0", this.yaowei.Text, customer_countid.ToString() });

            //cUSTOMER_FIT_ID++;
            if (i7 != 1)
            {
                MessageBox.Show("保存失败");
            }
            //臀围CODE
            int i8 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                     new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_03", "0", this.tunwei.Text, customer_countid.ToString() });

            //cUSTOMER_FIT_ID++;
            if (i8 != 1)
            {
                MessageBox.Show("保存失败");
            }

            //身长CODE
            int i9 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                     new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_04", "0", this.shenchang.Text, customer_countid.ToString() });

            //cUSTOMER_FIT_ID++;
            if (i9 != 1)
            {
                MessageBox.Show("保存失败");
            }

            //领围CODE
            int i10 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                      new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_01", "0", this.lingwei.Text, customer_countid.ToString() });

            //cUSTOMER_FIT_ID++;
            if (i10 != 1)
            {
                MessageBox.Show("保存失败");
            }

            //腕围CODE
            int i11 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                      new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_08", "0", this.wanwei.Text, customer_countid.ToString() });

            //cUSTOMER_FIT_ID++;
            if (i11 != 1)
            {
                MessageBox.Show("保存失败");
            }

            //袖长CODE
            int i12 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                      new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_06", "0", this.xiuchang.Text, customer_countid.ToString() });

            //cUSTOMER_FIT_ID++;
            if (i12 != 1)
            {
                MessageBox.Show("保存失败");
            }

            //上臂袖肥CODE
            int i13 = SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                      new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_ITEM_07", "0", this.shangbixiufei.Text, customer_countid.ToString() });

            //cUSTOMER_FIT_ID++;
            if (i13 != 1)
            {
                MessageBox.Show("保存失败");
            }
            //腹型CODE

            switch (this.fuxing.Text)
            {
            case "凹陷": SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                       new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_02", "0", "4", customer_countid.ToString() }); break;

            case "平坦":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_02", "0", "5", customer_countid.ToString() }); break;

            case "微凸":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_02", "0", "6", customer_countid.ToString() }); break;

            case "中凸":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_02", "0", "7", customer_countid.ToString() }); break;

            case "重凸":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_02", "0", "8", customer_countid.ToString() }); break;
            }
            //cUSTOMER_FIT_ID++;
            //体型CODE
            switch (this.tixing.Text)
            {
            case "超瘦":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_03", "0", "CD03_01", customer_countid.ToString() }); break;

            case "标准":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_03", "0", "CD03_02", customer_countid.ToString() }); break;

            case "微胖":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_03", "0", "CD03_03", customer_countid.ToString() }); break;

            case "肥胖":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_03", "0", "CD03_04", customer_countid.ToString() }); break;

            case "肌肉":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_03", "0", "CD03_05", customer_countid.ToString() }); break;

            case "健身达人":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_03", "0", "CD03_06", customer_countid.ToString() }); break;
            }
            //cUSTOMER_FIT_ID++;
            //特征CODE
            switch (this.shentitezheng.Text)
            {
            case "背部厚实":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_05", "0", "CD05_01", customer_countid.ToString() }); break;

            case "脖子特别粗":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_05", "0", "CD05_02", customer_countid.ToString() }); break;

            case "臀部特别大":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_05", "0", "CD05_03", customer_countid.ToString() }); break;

            case "手臂特别长":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_05", "0", "CD05_04", customer_countid.ToString() }); break;

            case "肩部特别宽":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_05", "0", "CD05_05", customer_countid.ToString() }); break;

            case "脖子特别短":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_05", "0", "CD05_06", customer_countid.ToString() }); break;
            }


            //cUSTOMER_FIT_ID++;
            //肩型
            switch (this.jianxing.Text)
            {
            case "平肩":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_01", "0", "1", customer_countid.ToString() }); break;

            case "溜肩":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_01", "0", "2", customer_countid.ToString() }); break;

            case "正常":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_01", "0", "3", customer_countid.ToString() }); break;
            }
            //cUSTOMER_FIT_ID++;
            //背型
            switch (this.tunxing.Text)
            {
            case "挺胸":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_04", "0", "CD04_01", customer_countid.ToString() }); break;

            case "直背":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_04", "0", "CD04_02", customer_countid.ToString() }); break;

            case "驼背":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_04", "0", "CD04_03", customer_countid.ToString() }); break;
            }
            //cUSTOMER_FIT_ID++;
            //臀型
            switch (this.tunxing.Text)
            {
            case "正常":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_07", "0", "1", customer_countid.ToString() }); break;

            case "翘臀":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_07", "0", "2", customer_countid.ToString() }); break;

            case "平臀":
                SQLmtm.DoInsert("a_customer_fit_r", new string[] { "CUSTOMER_ID", "STYLE_CATEGORY_CD", "ITEM_CD", "ITEM_VALUE", "DELETE_FLAG", "FIT_VALUE", "FIT_COUNT_ID" },
                                new string[] { cUSTOMER_ID.ToString(), "STYLE_CATEGORY-SHIRT", "SHIRT_FITMT004", "FITMT_CODE_07", "0", "3", customer_countid.ToString() }); break;
            }
            DataRow dr_addressid = SQLmtm.GetDataRow("SELECT MAX(ADDRESS_ID) AS ADDRESS_ID FROM a_customer_address_p");

            aDDRESS_ID = Convert.ToInt32(dr_addressid["ADDRESS_ID"]);
            aDDRESS_ID++;
            SQLmtm.DoInsert("a_customer_address_p", new string[] { "ADDRESS_ID", "CUSTOMER_ID", "DEFAULT_ADDR_FLAG", "CONSIGNEE", "ADDRESS_PROVINCE_CD", "ADDRESS_CITY_CD", "ADDRESS_DISTRICT", "ADDRESS_DETAIL", "ZIP_CODE", "MOBILE", "DELETE_FLAG" },
                            new string[] { aDDRESS_ID.ToString(), cUSTOMER_ID.ToString(), "1", this.shouhuoren.Text, this.shengfen.Text, this.chengshi.Text, this.qvyv.Text, this.xiangxidizhi.Text, this.youbian.Text, this.shoujianshouji.Text, "0" });
            String listFitData = null;

            try
            {
                DataTable dt = SQLmtm.GetDataTable("SELECT CUSTOMER_ID,ITEM_CD,ITEM_VALUE,FIT_VALUE FROM `a_customer_fit_r` WHERE FIT_COUNT_ID='" + customer_countid.ToString() + "'");
                foreach (DataRow dr in dt.Rows)
                {
                    listFitData = listFitData + dr["ITEM_CD"].ToString() + "-" + dr["ITEM_VALUE"].ToString() + ":" + dr["FIT_VALUE"] + ",";
                }
            }
            catch
            {
                MessageBox.Show("保存失败");
                return;
            }
            FitValueCalculate fvc = new FitValueCalculate(customer_countid.ToString(), listFitData);

            String fjsondata = Newtonsoft.Json.JsonConvert.SerializeObject(fvc);

            //String entryDataJson = Newtonsoft.Json.JsonConvert.SerializeObject(class1);
            RestCall.PostHttp("https://shirtmtm.com/fragsmart-mtm/customer/update/update", fjsondata);
            //RestCall.PostHttp("http://localhost:8080/customer/update/update", fjsondata);
            MessageBox.Show("保存成功");
            this.Close();
        }
예제 #22
0
 /// <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 });
 }
예제 #23
0
        /// <summary>
        /// 订单信息保存
        /// </summary>
        private void stylechangesave_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("确认保存吗?", "保存", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dialogResult == DialogResult.Yes)
            {
                if (Frm面料选择.mianliaoid == "" || this.chicun01.Text == "" || this.shuliang.Text == "")
                {
                    MessageBox.Show("请填写完整");
                    return;
                }
                DataRow drstylefit   = SQLmtm.GetDataRow("SELECT MAX(STYLE_FIT_ID) as STYLE_FIT_ID FROM `a_customer_fit_value_r`");
                int     sTYLE_FIT_ID = Convert.ToInt32(drstylefit["STYLE_FIT_ID"]);
                sTYLE_FIT_ID++;
                DataRow drcustomer   = SQLmtm.GetDataRow("select * from a_customer_p where CUSTOMER_ID='" + Frm客户.cUSTOMER_ID.ToString() + "'");
                string  customername = Convert.ToString(drcustomer["CUSTOMER_FIRST_NAME"]) + Convert.ToString(drcustomer["CUSTOMER_LAST_NAME"]);
                sTYLE_SIZE_CD = SizeService.SizeCD(this.chicun01.Text.Trim(), stylesizedt);
                DataRow drstyle = SQLmtm.GetDataRow("SELECT MAX(SYS_STYLE_ID) SYS_STYLE_ID FROM `s_style_p`");
                styleid = Convert.ToInt32(drstyle["SYS_STYLE_ID"]);
                styleid++;
                //a_customer_fit_value_r,s_style_fit_r表存储
                //ImpService.insertFit_R(sTYLE_FIT_ID, customername, fitv, ftvl, inftvl, outftvl);
                //动态尺寸保存
                ImpService.DynamicSaveSize(this, sTYLE_FIT_ID, customername);

                //s_style_p储存
                ImpService.insertS_Style_P(this, uc);
                //s_style_fit_r


                //设计点保存
                //ImpService.SaveDesign(this);
                ImpService.DynamicSaveDesign(this);
                //o_order_p
                //RestCall.httpGetMethod("https://shirtmtm.com/fragsmart-mtm/customer/update/payment?styleId=" + styleid.ToString() + "&customerId=" + CreateCustomer.cUSTOMER_ID.ToString() + "&addressId=" + CreateCustomer.aDDRESS_ID.ToString() + "&number=" + this.shuliang.Text);
                RestCall.httpGetMethod("http://localhost:8080/customer/update/payment?styleId=" + styleid.ToString() + "&customerId=" + Frm客户.cUSTOMER_ID.ToString() + "&addressId=" + Frm客户.aDDRESS_ID.ToString() + "&number=" + this.shuliang.Text);
                DataRow ORDER_ID = SQLmtm.GetDataRow("SELECT MAX(ORDER_ID) AS ORDER_ID FROM `o_order_p`");
                int     order_id = Convert.ToInt32(ORDER_ID["ORDER_ID"]);
                //order_id++;
                SQLmtm.DoInsert("o_order_brand_r", new string[] { "OGNIZATION_ID", "SHOP_ID", "BRAND_ID", "ORDER_ID" }, new string[] { "95", "18", "", order_id.ToString() });
                SQLmtm.DoInsert("t_order_type", new string[] { "ORDER_ID", "ORDER_TYPE" }, new string[] { order_id.ToString(), "1" });
                if (Convert.ToInt32(this.shuliang.Text) == Convert.ToInt32(this.shuliang.Text))
                {
                    MessageBox.Show("保存成功!");
                    //this.closeForm();
                    this.Close();
                }
                else
                {
                    MessageBox.Show("保存失败");
                }
            }
            //else
            //{
            //    MessageBox.Show("请填写完整");
            //    //return;
            //}
            else
            {
                return;
            }
        }
예제 #24
0
        /// <summary>
        /// 查找
        /// </summary>
        private void DoButtonClick()
        {
            this.splashScreenManager1.ShowWaitForm();
            this.splashScreenManager1.SetWaitFormCaption("请稍后,正在加载中....");        // 标题
            this.splashScreenManager1.SetWaitFormDescription("正在初始化.....");       // 信息
            //DataTable dt = SQLmtm.GetDataTable("SELECT ITEM_VALUE AS 领子id,ITEM_NAME_CN AS 领子名  FROM `a_designoption_p` WHERE ITEM_CD='4SCO' AND (ITEM_VALUE LIKE '%"+this.textBox1.Text+"%' OR ITEM_NAME_CN LIKE '%"+this.textBox1.Text+"%')");
            //gridControl1.DataSource = dt;
            DataTable dt = SQLmtm.GetDataTable("SELECT\n" +
                                               "	s1.itemValue AS 领子id,\n"+
                                               "	s1.itemNameCn AS 领子名,\n"+
                                               "S2.UPLOAD_FILE AS picn,\n" +
                                               "	s2.picurl \n"+
                                               "FROM\n" +
                                               "	(\n"+
                                               "	SELECT\n"+
                                               "		ap.ITEM_VALUE itemValue,\n"+
                                               "		ap.DESIGN_ID id,\n"+
                                               "		CONCAT( ap.ITEM_VALUE, \":\", ap.ITEM_NAME_CN ) itemNameCn,\n"+
                                               "		ap.ITEM_CD itemCode,\n"+
                                               "		adp.ITEM_CD itemParentCode \n"+
                                               "	FROM\n"+
                                               "		a_designoption_p ap\n"+
                                               "		LEFT JOIN a_designoption_p adp ON adp.ITEM_VALUE = ap.ITEM_CD\n"+
                                               "		LEFT JOIN a_ognization_desgin_r adr ON ap.DESIGN_ID = adr.DESGIN_ID \n"+
                                               "	WHERE\n"+
                                               "		( ap.ITEM_CATEGORY_CD = \"\" OR ap.ITEM_CATEGORY_CD IS NULL ) \n"+
                                               "		AND ap.STYLE_CATEGORY_CD = 'STYLE_CATEGORY-SHIRT' \n"+
                                               "		AND ap.ITEM_CD = '4SCO' -- AND ap.ITEM_CD IN ( SELECT ap.ITEM_VALUE itemValue FROM a_designoption_p ap WHERE ap.ITEM_CATEGORY_CD ='ITEM_TYPE_CD-10' )\n"+
                                               "		\n"+
                                               "		AND adr.OGNIZATION_ID = 95 \n"+
                                               "		AND ap.ITEM_VALUE IN (\n"+
                                               "		SELECT\n"+
                                               "			ap.ITEM_VALUE itemValue \n"+
                                               "		FROM\n"+
                                               "			a_designoption_p ap \n"+
                                               "		WHERE\n"+
                                               "			ap.DESIGN_ID IN ( SELECT ar.DESGIN_ID FROM a_shop_desgin_r ar WHERE ar.SHOP_ID = 18 ) \n"+
                                               "		) \n"+
                                               "	ORDER BY\n"+
                                               "		ap.ITEM_CD,\n"+
                                               "		ap.ITEM_SORT ASC \n"+
                                               "	) AS s1\n"+
                                               "	LEFT JOIN (\n"+
                                               "	SELECT\n"+
                                               "		a.ITEM_CD,\n"+
                                               "		a.ITEM_VALUE,\n"+
                                               "		a.ITEM_NAME_CN,\n"+
                                               "		CONCAT( 'https://sshirtmtmbucket.oss-cn-zhangjiakou.aliyuncs.com/sshirtmtm/', w.UPLOAD_FILE ) AS picurl,\n"+
                                               "		w.* \n"+
                                               "	FROM\n"+
                                               "		a_designoption_p a\n"+
                                               "		LEFT JOIN w_upload_file_p w ON a.FILE_ID = w.FILE_ID \n"+
                                               "	WHERE\n"+
                                               "		a.FILE_ID IS NOT NULL \n"+
                                               "	) AS s2 ON s1.itemCode = s2.ITEM_CD \n"+
                                               "	AND s1.itemValue = s2.ITEM_VALUE");

            this.panel1.Controls.Clear();
            height = 0;
            width  = 0;
            int i = 0;

            panelLocition = new PanelLocition(this.panel1.Width, this.panel1.Height, dt.Rows.Count);
            foreach (DataRow dr in dt.Rows)
            {
                LingZiCard oc = new LingZiCard(this);
                oc.label1.Text = dr["领子名"].ToString();
                oc.lingzi      = dr["领子名"].ToString();
                oc.lingziid    = dr["领子id"].ToString();
                oc.picurl      = dr["picurl"].ToString();
                try
                {
                    //string url = string.Format(@cd.picture, 5, 123456);
                    //string url = string.Format(@"https://sshirtmtmbucket.oss-cn-zhangjiakou.aliyuncs.com/sshirtmtm/ZSF-1-320.jpg?size={0}&content={1}", 5, 123456);

                    /*
                     * System.Net.WebRequest webreq = System.Net.WebRequest.Create(oc.picurl);
                     * System.Net.WebResponse webres = webreq.GetResponse();
                     * using (System.IO.Stream stream = webres.GetResponseStream())
                     * {
                     *  oc.pictureBox1.Image = Image.FromStream(stream);
                     * }*/
                    //oc.pictureBox1.Load(@"pic\" + dr["picn"].ToString().Trim());
                    oc.pictureBox1.Image = Image.FromFile(@"pic\" + dr["picn"].ToString().Trim());
                }
                catch
                {
                }
                this.generateUserControl(oc, i);
                this.panel1.Controls.Add(oc);//将控件加入panel
                //oc.pictureBox1.Click += new EventHandler(this.picture_Click);
                i++;
            }
            this.splashScreenManager1.CloseWaitForm();
        }
예제 #25
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();
                        }
                    }
                }
            }
        }
예제 #26
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            DataTable dt = SQLmtm.GetDataTable("SELECT CUSTOMER_ID AS ID,CONCAT(CONCAT(CUSTOMER_FIRST_NAME,' '),CUSTOMER_LAST_NAME ) AS 客户姓名,MOBILE AS 手机,CREATE_DATE AS 注册时间 FROM `a_customer_p` WHERE CUSTOMER_FIRST_NAME LIKE'%" + this.textBox1.Text + "%' OR CUSTOMER_LAST_NAME LIKE '%" + this.textBox1.Text + "%' OR MOBILE LIKE '%" + this.textBox1.Text + "%' ORDER BY CREATE_DATE DESC LIMIT 1000");

            gridControl1.DataSource = dt;
        }
예제 #27
0
        private void CustomerChoose_Load(object sender, EventArgs e)
        {
            DataTable dt = SQLmtm.GetDataTable("SELECT CUSTOMER_ID AS ID,CONCAT(CONCAT(CUSTOMER_FIRST_NAME,' '),CUSTOMER_LAST_NAME ) AS 客户姓名,MOBILE AS 手机,CREATE_DATE AS 注册时间 FROM `a_customer_p` ORDER BY CREATE_DATE DESC LIMIT 1000");

            gridControl1.DataSource = dt;
        }