//窗体载入
        private void frmProdPromotionMgr_Load(object sender, EventArgs e)
        {
            string[] strKey = "EUser_Id,EDept_Id,Fy_Id,Company_Id,Flag".Split(",".ToCharArray());
            string[] strVal = new string[] {
                CApplication.App.CurrentSession.UserId.ToString(),
                     CApplication.App.CurrentSession.DeptId.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                //CApplication.App.CurrentSession.Company_Id.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                "2"
            };
            dsLoad = this.DataRequest_By_DataSet(strSpName, strKey, strVal);
            #region 绑定工厂
            StaticFunctions.BindDplComboByTable(dplFy, dsLoad.Tables[0], "Name", "Fy_Id",
                                                new string[] { "Fy_Id", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", false);
            //dplFy.ItemIndex = 0;
            #endregion

            #region 绑定方案
            StaticFunctions.BindDplComboByTable(lupProject, dsLoad.Tables[1], "FANumber", "Festival_Id",
                                                new string[] { "FANumber", "Festival_Name", "Festival_StDate", "Festival_EdDate" },
                                                new string[] { "方案号", "方案名称", "开始时间", "结束时间" }, true, "", "", false);
            lupProject.ItemIndex = 0;
            #endregion

            #region 绑定类别
            StaticFunctions.BindDplComboByTable(extTreePc, dsLoad.Tables[2], "Kind_Name", "Kind_Id|Parent_Kind_Id", "Kind_Key=400", new string[] { "Kind_Key=120", "Kind_Name=200" }, new string[] { "拼音", "名称" }, "Kind_Id", "Level>0", "Kind_Key", "Kind_Id", "Parent_Kind_Id", "", true);
            #endregion
        }
Beispiel #2
0
        private void frmLogin_Load(object sender, EventArgs e)
        {
            string[] strKey = "Form,EUser_Id,EDept_Id,EFy_Id".Split(",".ToCharArray());
            string[] strVal = new string[] { this.Name
                                             , CApplication.App.CurrentSession.UserId.ToString()
                                             , CApplication.App.CurrentSession.DeptId.ToString()
                                             , CApplication.App.CurrentSession.FyId.ToString() };
            MethodRequest req = new MethodRequest();

            req.ParamKeys = strKey;
            req.ParamVals = strVal;
            req.ProceName = "Get_Form_Load_Table";
            req.ProceDb   = this.BtProduceCS;
            DataSet dsLoad = ServerRequestProcess.DbRequest.DataRequest_By_DataSet(req);

            DataTable dtDept = dsLoad.Tables[0];

            StaticFunctions.BindDplComboByTable(dplDeptId, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", false);

            dplDeptId.EditValue = CApplication.App.CurrentSession.DeptId;
            dplDeptId.Focus();
            dplDeptId.SelectAll();
        }
Beispiel #3
0
 private void frmSelectRptTicket_Load(object sender, EventArgs e)
 {
     StaticFunctions.BindDplComboByTable(dplRpt, DtBtnM, "RptTicketTName", "BsuSetBtnM_Id",
                                         new string[] { "RptTicketTName", "RptTitle" },
                                         new string[] { "模板名称", "标题名称" }, true, "", "", false);
     dplRpt.ShowPopup();
 }
Beispiel #4
0
        //窗体载入
        private void frmProdAreaRelMgr_Load(object sender, EventArgs e)
        {
            string[] strKey = "EUser_Id,EDept_Id,Fy_Id,Company_Id,Flag".Split(",".ToCharArray());
            string[] strVal = new string[] {
                CApplication.App.CurrentSession.UserId.ToString(),
                     CApplication.App.CurrentSession.DeptId.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                "2"
            };
            dsLoad = this.DataRequest_By_DataSet(strSpName, strKey, strVal);
            #region 绑定工厂
            StaticFunctions.BindDplComboByTable(dplFy, dsLoad.Tables[0], "Name", "Fy_Id",
                                                new string[] { "Fy_Id", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", false);
            //dplFy.ItemIndex = 0;
            #endregion

            #region 绑定类别
            StaticFunctions.BindDplComboByTable(extTreePc, dsLoad.Tables[1], "Kind_Name", "Kind_Id|Parent_Kind_Id", "Kind_Key=400", new string[] { "Kind_Key=120", "Kind_Name=200" }, new string[] { "拼音", "名称" }, "Kind_Id", "Level>0", "Kind_Key", "Kind_Id", "Parent_Kind_Id", "", true);
            #endregion

            #region 绑定区域
            StaticFunctions.BindCheckedComboBoxEdit(chkComArea, dsLoad.Tables[2], "Area_Name", "Area_Id", "", "");
            foreach (CheckedListBoxItem item in chkComArea.Properties.Items)
            {
                item.CheckState = CheckState.Checked;
            }
            #endregion
        }
        public override void GetCurrAllItem()
        {
            List <string> lisSpParmValue = new List <string>();

            string[] strKey = "EUser_Id,EDept_Id,Fy_Id,flag".Split(",".ToCharArray());
            lisSpParmValue.AddRange(new string[] {
                CApplication.App.CurrentSession.UserId.ToString(),
                CApplication.App.CurrentSession.DeptId.ToString(),
                CApplication.App.CurrentSession.FyId.ToString(),
                "4"
            });
            DataSet ds = this.DataRequest_By_DataSet(strSpName, strKey, lisSpParmValue.ToArray());

            if (ds == null)
            {
                return;
            }

            blInitBound = true;
            StaticFunctions.BindDplComboByTable(dplType, ds.Tables[0], "SetText", "SetValue",
                                                new string[] { "SetText=200" },
                                                new string[] { "类型名称" }, true, "SetText", string.Empty, false);
            blInitBound = false;

            frmDataTable = ds.Tables[1];
            frmDataTable.AcceptChanges();

            blInitBound          = true;
            gridCMain.DataSource = frmDataTable.DefaultView;
            gridVMain.BestFitColumns();
            blInitBound = false;
            dplType_EditValueChanged(null, null);
            gridVMain_FocusedRowChanged(gridVMain, new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs(-1, gridVMain.FocusedRowHandle));
        }
Beispiel #6
0
        private void frmRoleEdit_Load(object sender, EventArgs e)
        {
            this.Text = "角色用户维护/" + RoleName;
            DataSet dtBasic = this.GetFrmLoadDs(this.Name);

            StaticFunctions.BindDplComboByTable(dplUserType, dtBasic.Tables[1], "Name", "SetValue", "", "", true);
            StaticFunctions.BindDplComboByTable(dplSsDep, dtBasic.Tables[0], "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", true);
        }
Beispiel #7
0
        //窗体载入
        private void frmSelectProdMgr_Load(object sender, EventArgs e)
        {
            string[] strKey = "EUser_Id,EDept_Id,Fy_Id,Flag".Split(",".ToCharArray());
            string[] strVal = new string[] {
                CApplication.App.CurrentSession.UserId.ToString(),
                     CApplication.App.CurrentSession.DeptId.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                "2"
            };
            dsLoad = this.DataRequest_By_DataSet(strSpName, strKey, strVal);

            StaticFunctions.BindDplComboByTable(dplFy, dsLoad.Tables[0], "Name", "Fy_Id",
                                                new string[] { "Fy_Id", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", false);
            dplFy.ItemIndex = 0;
        }
        private void frmSetSpecialFee_Load(object sender, EventArgs e)
        {
            string[] strKey = "EUser_Id,EDept_Id,Fy_Id,Flag".Split(",".ToCharArray());
            string[] strVal = new string[] {
                CApplication.App.CurrentSession.UserId.ToString(),
                     CApplication.App.CurrentSession.DeptId.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                "6"
            };
            DataSet ds = this.DataRequest_By_DataSet(strSpName, strKey, strVal);

            StaticFunctions.BindDplComboByTable(lueOperation, ds.Tables[0], "SetText", "SetValue",
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "编号", "设置方式" }, true, "", "", false);
            this.label1.Text = "对选择的客户:" + Cust + "设置特殊工费";
            this.Location    = new Point(x + 20, y + 20);
        }
        //选择合并款号
        private void lupMegerPNumber_QueryPopUp(object sender, CancelEventArgs e)
        {
            DataTable dtPNumber = new DataTable();

            dtPNumber.Columns.Add("PNumber", System.Type.GetType("System.String"));
            foreach (Control item in this.grpPic.Controls)
            {
                if (item.GetType().ToString() == "System.Windows.Forms.Label")
                {
                    DataRow dr = dtPNumber.NewRow();
                    dr["PNumber"] = item.Text;
                    dtPNumber.Rows.Add(dr);
                }
            }
            StaticFunctions.BindDplComboByTable(lupMegerPNumber, dtPNumber, "PNumber", "PNumber",
                                                new string[] { "PNumber" },
                                                new string[] { "合并款号" }, true, "", "", false);
            lupMegerPNumber.ItemIndex = -1;
        }
        //窗体载入
        private void frmSelectProdMgr_Load(object sender, EventArgs e)
        {
            string[] strKey = "EUser_Id,EDept_Id,Fy_Id,Flag".Split(",".ToCharArray());
            string[] strVal = new string[] {
                CApplication.App.CurrentSession.UserId.ToString(),
                     CApplication.App.CurrentSession.DeptId.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                "2"
            };
            dsLoad = this.DataRequest_By_DataSet(strSpName, strKey, strVal);

            #region 绑定工厂
            StaticFunctions.BindDplComboByTable(dplFy, dsLoad.Tables[0], "Name", "Fy_Id",
                                                new string[] { "Fy_Id", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", false);
            dplFy.ItemIndex = 0;
            #endregion

            #region 绑定类别
            StaticFunctions.BindDplComboByTable(extTreePc, dsLoad.Tables[1], "Kind_Name", "Kind_Id|Parent_Kind_Id", "Kind_Key=400", new string[] { "Kind_Key=120", "Kind_Name=200" }, new string[] { "拼音", "名称" }, "Kind_Id", "Level>0", "Kind_Key", "Kind_Id", "Parent_Kind_Id", "", true);
            #endregion
        }
        private void frmProdAreaRelMgrEdit_Load(object sender, EventArgs e)
        {
            dtStDay.EditValue  = DateTime.Now.ToShortDateString();
            dtEndDay.EditValue = DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-" + DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month);

            string[] strKey = "EUser_Id,EDept_Id,Fy_Id,Company_Id,flag".Split(",".ToCharArray());
            string[] strVal = new string[] {
                CApplication.App.CurrentSession.UserId.ToString(),
                     CApplication.App.CurrentSession.DeptId.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                "2"
            };
            dsLoad = this.DataRequest_By_DataSet(strSpName, strKey, strVal);
            StaticFunctions.BindDplComboByTable(lueArea, dsLoad.Tables[2], "Area_Name", "Area_Id",
                                                new string[] { "Area_Id", "Area_Name" },
                                                new string[] { "编号", "名称" }, true, "", "", true);
            lueArea.ItemIndex = dsLoad.Tables[2].Rows.Count;
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit1, dsLoad.Tables[1], "Kind_Name", "Kind_Id",
                                                new string[] { "Kind_Id", "Kind_Name" },
                                                new string[] { "编号", "名称" }, true, "", "", true);
        }
        //窗体载入
        private void frmProdAuthorVisibleToCust_Load(object sender, EventArgs e)
        {
            #region 绑定客户
            string[] strKey = "EUser_Id,EDept_Id,Fy_Id,Flag".Split(",".ToCharArray());
            string[] strVal = new string[] {
                CApplication.App.CurrentSession.UserId.ToString(),
                     CApplication.App.CurrentSession.DeptId.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                "2"
            };
            dsLoad = this.DataRequest_By_DataSet(strSpName, strKey, strVal);
            StaticFunctions.BindCheckedComboBoxEdit(chkComCust, dsLoad.Tables[0], "CustName", "CustId", "", "");

            foreach (CheckedListBoxItem item in chkComCust.Properties.Items)
            {
                item.CheckState = CheckState.Checked;
            }
            #endregion

            #region 绑定类别
            StaticFunctions.BindDplComboByTable(extTreePc, dsLoad.Tables[1], "Kind_Name", "Kind_Id|Parent_Kind_Id", "Kind_Key=400", new string[] { "Kind_Key=120", "Kind_Name=200" }, new string[] { "拼音", "名称" }, "Kind_Id", "Level>0", "Kind_Key", "Kind_Id", "Parent_Kind_Id", "", true);
            #endregion
        }
        private void frmEmpEdit_Load(object sender, EventArgs e)
        {
            string[] strKey = "Form,EUser_Id,EDept_Id,EFy_Id".Split(",".ToCharArray());
            DataSet  dsLoad = this.DataRequest_By_DataSet("Get_Form_Load_Table", strKey,
                                                          new string[] { this.Name
                                                                         , CApplication.App.CurrentSession.UserId.ToString()
                                                                         , CApplication.App.CurrentSession.DeptId.ToString()
                                                                         , CApplication.App.CurrentSession.FyId.ToString() });

            dsLoad.AcceptChanges();
            dtDept = dsLoad.Tables[0];
            dtSys  = dsLoad.Tables[1];

            StaticFunctions.BindDplComboByTable(repTst, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=2", true);

            InitContr();

            dtCreate_DtSt.EditValue = DateTime.Now.AddDays(-1).ToShortDateString();
            dtCreate_DtEd.EditValue = DateTime.Now.AddDays(-1).ToShortDateString();

            ckbShowDetail_CheckedChanged(null, null);
        }
        private void InitContrInit()
        {
            blInit = true;
            StaticFunctions.BindDplComboByTable(dplPCType, dtSys, "Name", "SetValue",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "SetKey='Goods_PCType'", false);
            dplPCType.EditValue = "1";
            blInit = false;

            StaticFunctions.BindDplComboByTable(repCSto_Class, dtSys, "Name", "SetValue",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "SetKey='Sto_Class'", true);
            StaticFunctions.BindDplComboByTable(repPSto_Class, dtSys, "Name", "SetValue",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "SetKey='Sto_Class'", true);

            StaticFunctions.BindDplComboByTable(repUDeptULoss, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=1", true);

            StaticFunctions.BindDplComboByTable(repFDept, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=2", true);

            StaticFunctions.BindDplComboByTable(repTDept, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=2", true);

            StaticFunctions.BindDplComboByTable(repUDeptURece, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=1", true);

            StaticFunctions.BindDplComboByTable(repUDeptUDeli, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=1", true);

            StaticFunctions.BindDplComboByTable(repRDept, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=2", true);

            StaticFunctions.BindDplComboByTable(repDDept, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=2", true);

            StaticFunctions.BindDplComboByTable(repUDeptTstSend, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=1", true);

            StaticFunctions.BindDplComboByTable(repUDeptTstRece, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=1", true);

            StaticFunctions.BindDplComboByTable(repDDeptTstRece, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=2", true);

            StaticFunctions.BindDplComboByTable(repDeptTstSend, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=2", true);

            StaticFunctions.BindDplComboByTable(repUDeptUChk, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=1", true);

            StaticFunctions.BindDplComboByTable(repDeptUChk, dtDept, "Name", "Dept_Id",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "Dept_Type=2", true);

            StaticFunctions.BindDplComboByTable(repDeliType, dtSys, "Name", "SetValue",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "SetKey='DeliType'", true);
            StaticFunctions.BindDplComboByTable(repTstDeliType, dtSys, "Name", "SetValue",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "SetKey='DeliType'", true);

            StaticFunctions.BindDplComboByTable(repChkItem_TypeCProd, dtSys, "Name", "SetValue",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "SetKey='ChkItem_Type'", true);
            StaticFunctions.BindDplComboByTable(repChkItem_TypePProd, dtSys, "Name", "SetValue",
                                                new string[] { "Number", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "SetKey='ChkItem_Type'", true);
        }
Beispiel #15
0
        private void frmProdManagerInfo_Load(object sender, EventArgs e)
        {
            string[] strKey = "Key_Id,EUser_Id,EDept_Id,Fy_Id,flag".Split(",".ToCharArray());
            string[] strVal = new string[] { strKeyId,
                                             CApplication.App.CurrentSession.UserId.ToString(),
                                             CApplication.App.CurrentSession.DeptId.ToString(),
                                             CApplication.App.CurrentSession.FyId.ToString(),
                                             "2" };
            dsLoad = this.DataRequest_By_DataSet(strSpName, strKey, strVal);
            StaticFunctions.BindDplComboByTable(dplfy, dsLoad.Tables[0], "Name", "Fy_Id",
                                                new string[] { "Fy_Id", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", true);
            dplfy.ItemIndex = -1;

            #region 绑定成色
            StaticFunctions.BindCheckedComboBoxEdit(chkPqName, dsLoad.Tables[1], "Name", "Pq_Id", "", "");
            #endregion

            #region 绑定配件
            StaticFunctions.BindDplComboByTable(lookParts, dsLoad.Tables[15], "Name", "Part_Id",
                                                new string[] { "Part_Id", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", true);
            #endregion

            #region 绑定性别
            StaticFunctions.BindDplComboByTable(lookSex, dsLoad.Tables[3], "SetText", "SetValue",
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "序号", "性别" }, true, "", "", true);
            //lookSex.ItemIndex = -1;
            #endregion

            #region 绑定设计类型
            StaticFunctions.BindDplComboByTable(lookType, dsLoad.Tables[4], "SetText", "SetValue",
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "序号", "设计类型" }, true, "", "", false);
            //lookdesginType.ItemIndex = -1;
            #endregion

            #region 绑定组合方式
            StaticFunctions.BindDplComboByTable(lookZuHeType, dsLoad.Tables[5], "SetText", "SetValue",
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "序号", "组合类型" }, true, "", "", false);
            //lookZuHeType.ItemIndex = -1;
            #endregion

            #region 绑定类别
            StaticFunctions.BindDplComboByTable(extKindName, dsLoad.Tables[14], "Kind_Name", "Kind_Id|Parent_Kind_Id", "Kind_Key=400", new string[] { "Kind_Key=120", "Kind_Name=200" }, new string[] { "拼音", "名称" }, "Kind_Id", "Level>0", "Kind_Key", "Kind_Id", "Parent_Kind_Id", "", true);
            #endregion

            #region 绑定辅料大类
            StaticFunctions.BindDplComboByTable(extPMaPc, dsLoad.Tables[13], "Stones_Name", "Stones_Id|Parent_Stones_Id", "Stones_Key=400", new string[] { "Stones_Key=120", "Stones_Name=200" }, new string[] { "拼音", "名称" }, "Stones_Id", "Level>0", "Stones_Key", "Stones_Id", "Parent_Stones_Id", "", true);
            #endregion

            #region 绑定基础工艺
            StaticFunctions.BindDplComboByTable(extTreeTech, dsLoad.Tables[2], "Tec_Name", "Tec_Id|Parent_Tec_Id", "Tec_Key=400", new string[] { "Tec_Key=120", "Tec_Name=200" }, new string[] { "拼音", "名称" }, "Tec_Id", "Level>0", "Tec_Key", "Tec_Id", "Parent_Tec_Id", "", true);
            #endregion

            #region 绑定表面工艺
            StaticFunctions.BindDplComboByTable(extPThceSur, dsLoad.Tables[6], "Sur_Name", "Sur_Id|Parent_Sur_Id", "Sur_Key=400", new string[] { "Sur_Key=120", "Sur_Name=200" }, new string[] { "拼音", "名称" }, "Sur_Id", "Level>0", "Sur_Key", "Sur_Id", "Parent_Sur_Id", "", true);
            #endregion

            #region 绑定花型
            StaticFunctions.BindDplComboByTable(extPFlowerType, dsLoad.Tables[7], "Flow_Name", "Flow_Id|Parent_Flow_Id", "Flow_Key=400", new string[] { "Flow_Key=120", "Flow_Name=200" }, new string[] { "拼音", "名称" }, "Flow_Id", "Level>0", "Flow_Key", "Flow_Id", "Parent_Flow_Id", "", true);
            #endregion

            #region 绑定边型
            StaticFunctions.BindDplComboByTable(extPSideType, dsLoad.Tables[8], "Squ_Name", "Squ_Id|Parent_Squ_Id", "Squ_Key=400", new string[] { "Squ_Key=120", "Squ_Name=200" }, new string[] { "拼音", "名称" }, "Squ_Id", "Level>0", "Squ_Key", "Squ_Id", "Parent_Squ_Id", "", true);
            #endregion

            #region 绑定圈口
            StaticFunctions.BindDplComboByTable(extPRound, dsLoad.Tables[9], "Rou_Name", "Rou_Id|Parent_Rou_Id", "Rou_Key=400", new string[] { "Rou_Key=120", "Rou_Name=200" }, new string[] { "拼音", "名称" }, "Rou_Id", "Level>0", "Rou_Key", "Rou_Id", "Parent_Rou_Id", "", true);
            #endregion

            #region 绑定面宽
            StaticFunctions.BindDplComboByTable(extPFaceWith, dsLoad.Tables[10], "Fac_Name", "Fac_Id|Parent_Fac_Id", "Fac_Key=400", new string[] { "Fac_Key=120", "Fac_Name=200" }, new string[] { "拼音", "名称" }, "Fac_Id", "Level>0", "Fac_Key", "Fac_Id", "Parent_Fac_Id", "", true);
            #endregion

            #region 绑定扣型
            StaticFunctions.BindDplComboByTable(extPFastener, dsLoad.Tables[11], "Fas_Name", "Fas_Id|Parent_Fas_Id", "Fas_Key=400", new string[] { "Fas_Key=120", "Fas_Name=200" }, new string[] { "拼音", "名称" }, "Fas_Id", "Level>0", "Fas_Key", "Fas_Id", "Parent_Fas_Id", "", true);
            #endregion

            #region 绑定结构
            StaticFunctions.BindDplComboByTable(extPStructure, dsLoad.Tables[12], "Str_Name", "Str_Id|Parent_Str_Id", "Str_Key=400", new string[] { "Str_Key=120", "Str_Name=200" }, new string[] { "拼音", "名称" }, "Str_Id", "Level>0", "Str_Key", "Str_Id", "Parent_Str_Id", "", true);
            #endregion

            LoadData();
        }
 private void frmSelectProdOne_Load(object sender, EventArgs e)
 {
     this.gridCMain.DataSource = dt;
     StaticFunctions.BindDplComboByTable(extPopupTree1, dtPc, "Kind_Name", "Kind_Id", "Kind_Key", new string[] { "Kind_Id", "Kind_Name" }, new string[] { "编号", "名称" }, "Kind_Id", "Kind_Id", "Kind_Key", "Kind_Id", "Parent_Kind_Id", "", true);
 }
        private void frmProdManager_Load(object sender, EventArgs e)
        {
            gridVMain.BestFitColumns();
            //dateEdit1.EditValue = DateTime.Now.ToShortDateString();
            //绑定协作工厂
            string[] strKey = "EUser_Id,EDept_Id,Fy_Id,flag".Split(",".ToCharArray());
            string[] strVal = new string[] {
                CApplication.App.CurrentSession.UserId.ToString(),
                     CApplication.App.CurrentSession.DeptId.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                "2"
            };
            dsLoad = this.DataRequest_By_DataSet(strSpName, strKey, strVal);
            StaticFunctions.BindDplComboByTable(dplfy, dsLoad.Tables[0], "Name", "Fy_Id",
                                                new string[] { "Fy_Id", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", true);
            dplfy.ItemIndex = -1;

            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit1, dsLoad.Tables[0], "Name", "Fy_Id",//生产工厂,协作工厂
                                                new string[] { "Fy_Id", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit2, dsLoad.Tables[3], "SetText", "SetValue",//性别
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "编号", "名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit3, dsLoad.Tables[4], "SetText", "SetValue",//设计类型
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "序号", "设计类型" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit4, dsLoad.Tables[5], "SetText", "SetValue",//组合方式
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "序号", "组合类型" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit5, dsLoad.Tables[1], "Name", "Pq_Id", //成色
                                                new string [] { "Pq_Id", "Name" },
                                                new string [] { "序号", "成色名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit6, dsLoad.Tables[2], "Tec_Name", "Tec_Id", //基础工艺
                                                new string[] { "Tec_Id", "Tec_Name" },
                                                new string[] { "序号", "基础工艺名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit7, dsLoad.Tables[6], "Sur_Name", "Sur_Id", //表面工艺
                                                new string[] { "Sur_Id", "Sur_Name" },
                                                new string[] { "序号", "表面工艺名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit8, dsLoad.Tables[7], "Flow_Name", "Flow_Id", //花型
                                                new string[] { "Flow_Id", "Flow_Name" },
                                                new string[] { "序号", "花型名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit9, dsLoad.Tables[8], "Squ_Name", "Squ_Id", //边型
                                                new string[] { "Squ_Id", "Squ_Name" },
                                                new string[] { "序号", "边型名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit10, dsLoad.Tables[9], "Rou_Name", "Rou_Id", //圈口
                                                new string[] { "Rou_Id", "Rou_Name" },
                                                new string[] { "序号", "圈口名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit11, dsLoad.Tables[10], "Fac_Name", "Fac_Id", //面宽
                                                new string[] { "Fac_Id", "Fac_Name" },
                                                new string[] { "序号", "面宽名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit12, dsLoad.Tables[11], "Fas_Name", "Fas_Id", //扣型
                                                new string[] { "Fas_Id", "Fas_Name" },
                                                new string[] { "序号", "扣型名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit13, dsLoad.Tables[12], "Str_Name", "Str_Id", //结构
                                                new string[] { "Str_Id", "Str_Name" },
                                                new string[] { "序号", "扣型名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit14, dsLoad.Tables[13], "Stones_Name", "Stones_Id", //辅料大类
                                                new string[] { "Stones_Id", "Stones_Name" },
                                                new string[] { "序号", "辅料大类名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit15, dsLoad.Tables[14], "Kind_Name", "Kind_Id", //类别名称
                                                new string[] { "Kind_Id", "Kind_Name" },
                                                new string[] { "序号", "类别名称" }, true, "", "", true);
            #endregion
            #region
            StaticFunctions.BindDplComboByTable(repositoryItemLookUpEdit16, dsLoad.Tables[15], "Name", "Part_Id",//配件
                                                new string[] { "Part_Id", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", true);
            #endregion
            #region 绑定成色
            StaticFunctions.BindCheckedComboBoxEdit(chkPqName, dsLoad.Tables[1], "Name", "Pq_Id", "", "");

            //foreach (CheckedListBoxItem item in chkPqName.Properties.Items)
            //{
            //    item.CheckState = CheckState.Checked;
            //}
            #endregion
            #region 绑定基础工艺
            StaticFunctions.BindDplComboByTable(extTreeTech, dsLoad.Tables[2], "Tec_Name", "Tec_Id|Parent_Tec_Id", "Tec_Key=400", new string[] { "Tec_Key=120", "Tec_Name=200" }, new string[] { "拼音", "名称" }, "Tec_Id", "Level>0", "Tec_Key", "Tec_Id", "Parent_Tec_Id", "", true);
            #endregion
            #region 绑定性别
            StaticFunctions.BindDplComboByTable(lookSex, dsLoad.Tables[3], "SetText", "SetValue",
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "序号", "性别" }, true, "", "", false);
            //lookSex.ItemIndex = -1;
            #endregion
            #region 绑定设计类型
            StaticFunctions.BindDplComboByTable(lookdesginType, dsLoad.Tables[4], "SetText", "SetValue",
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "序号", "设计类型" }, true, "", "", false);
            //lookdesginType.ItemIndex = -1;
            #endregion
            #region 绑定组合方式
            StaticFunctions.BindDplComboByTable(lookZuHeType, dsLoad.Tables[5], "SetText", "SetValue",
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "序号", "组合类型" }, true, "", "", false);
            //lookZuHeType.ItemIndex = -1;
            #endregion
            #region 绑定表面工艺
            StaticFunctions.BindDplComboByTable(extPThceSur, dsLoad.Tables[6], "Sur_Name", "Sur_Id|Parent_Sur_Id", "Sur_Key=400", new string[] { "Sur_Key=120", "Sur_Name=200" }, new string[] { "拼音", "名称" }, "Sur_Id", "Level>0", "Sur_Key", "Sur_Id", "Parent_Sur_Id", "", true);
            #endregion

            #region 绑定花型
            StaticFunctions.BindDplComboByTable(extPFlowerType, dsLoad.Tables[7], "Flow_Name", "Flow_Id|Parent_Flow_Id", "Flow_Key=400", new string[] { "Flow_Key=120", "Flow_Name=200" }, new string[] { "拼音", "名称" }, "Flow_Id", "Level>0", "Flow_Key", "Flow_Id", "Parent_Flow_Id", "", true);
            #endregion

            #region 绑定边型
            StaticFunctions.BindDplComboByTable(extPSideType, dsLoad.Tables[8], "Squ_Name", "Squ_Id|Parent_Squ_Id", "Squ_Key=400", new string[] { "Squ_Key=120", "Squ_Name=200" }, new string[] { "拼音", "名称" }, "Squ_Id", "Level>0", "Squ_Key", "Squ_Id", "Parent_Squ_Id", "", true);
            #endregion

            #region 绑定圈口
            StaticFunctions.BindDplComboByTable(extPRound, dsLoad.Tables[9], "Rou_Name", "Rou_Id|Parent_Rou_Id", "Rou_Key=400", new string[] { "Rou_Key=120", "Rou_Name=200" }, new string[] { "拼音", "名称" }, "Rou_Id", "Level>0", "Rou_Key", "Rou_Id", "Parent_Rou_Id", "", true);
            #endregion

            #region 绑定面宽
            StaticFunctions.BindDplComboByTable(extPFaceWith, dsLoad.Tables[10], "Fac_Name", "Fac_Id|Parent_Fac_Id", "Fac_Key=400", new string[] { "Fac_Key=120", "Fac_Name=200" }, new string[] { "拼音", "名称" }, "Fac_Id", "Level>0", "Fac_Key", "Fac_Id", "Parent_Fac_Id", "", true);
            #endregion

            #region 绑定扣型
            StaticFunctions.BindDplComboByTable(extPFastener, dsLoad.Tables[11], "Fas_Name", "Fas_Id|Parent_Fas_Id", "Fas_Key=400", new string[] { "Fas_Key=120", "Fas_Name=200" }, new string[] { "拼音", "名称" }, "Fas_Id", "Level>0", "Fas_Key", "Fas_Id", "Parent_Fas_Id", "", true);
            #endregion

            #region 绑定结构
            StaticFunctions.BindDplComboByTable(extPStructure, dsLoad.Tables[12], "Str_Name", "Str_Id|Parent_Str_Id", "Str_Key=400", new string[] { "Str_Key=120", "Str_Name=200" }, new string[] { "拼音", "名称" }, "Str_Id", "Level>0", "Str_Key", "Str_Id", "Parent_Str_Id", "", true);
            #endregion

            #region 绑定辅料大类
            StaticFunctions.BindDplComboByTable(extPMaPc, dsLoad.Tables[13], "Stones_Name", "Stones_Id|Parent_Stones_Id", "Stones_Key=400", new string[] { "Stones_Key=120", "Stones_Name=200" }, new string[] { "拼音", "名称" }, "Stones_Id", "Level>0", "Stones_Key", "Stones_Id", "Parent_Stones_Id", "", true);
            #endregion

            #region 绑定类别
            StaticFunctions.BindDplComboByTable(extPKindName, dsLoad.Tables[14], "Kind_Name", "Kind_Id|Parent_Kind_Id", "Kind_Key=400", new string[] { "Kind_Key=120", "Kind_Name=200" }, new string[] { "拼音", "名称" }, "Kind_Id", "Level>0", "Kind_Key", "Kind_Id", "Parent_Kind_Id", "", true);
            #endregion
        }
        private void frmProdManagerInfo_Load(object sender, EventArgs e)
        {
            string[] strKey = "EUser_Id,EDept_Id,Fy_Id,Flag".Split(",".ToCharArray());
            string[] strVal = new string[] {
                CApplication.App.CurrentSession.UserId.ToString(),
                     CApplication.App.CurrentSession.DeptId.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                "8"
            };
            dsLoad = this.DataRequest_By_DataSet(strSpName, strKey, strVal);
            StaticFunctions.BindDplComboByTable(dplfy, dsLoad.Tables[0], "Name", "Fy_Id",
                                                new string[] { "Fy_Id", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", true);

            #region 绑定成色
            StaticFunctions.BindCheckedComboBoxEdit(chkPqName, dsLoad.Tables[1], "Name", "Pq_Id", "", "");
            #endregion

            #region 绑定配件
            StaticFunctions.BindDplComboByTable(lookParts, dsLoad.Tables[15], "Name", "Part_Id",
                                                new string[] { "Part_Id", "Name" },
                                                new string[] { "编号", "名称" }, true, "", "", true);
            #endregion

            #region 绑定性别
            StaticFunctions.BindDplComboByTable(lookSex, dsLoad.Tables[3], "SetText", "SetValue",
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "序号", "性别" }, true, "", "", false);
            //lookSex.ItemIndex = -1;
            #endregion

            #region 绑定设计类型
            StaticFunctions.BindDplComboByTable(lookType, dsLoad.Tables[4], "SetText", "SetValue",
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "序号", "设计类型" }, true, "", "", false);
            //lookdesginType.ItemIndex = -1;
            #endregion

            #region 绑定组合方式
            StaticFunctions.BindDplComboByTable(lookZuHeType, dsLoad.Tables[5], "SetText", "SetValue",
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "序号", "组合类型" }, true, "", "", false);
            //lookZuHeType.ItemIndex = -1;
            #endregion

            #region 绑定类别
            StaticFunctions.BindDplComboByTable(extKindName, dsLoad.Tables[14], "Kind_Name", "Kind_Id|Parent_Kind_Id", "Kind_Key=400", new string[] { "Kind_Key=120", "Kind_Name=200" }, new string[] { "拼音", "名称" }, "Kind_Id", "Level>0", "Kind_Key", "Kind_Id", "Parent_Kind_Id", "", true);
            #endregion

            #region 绑定辅料大类
            StaticFunctions.BindDplComboByTable(extPMaPc, dsLoad.Tables[13], "Stones_Name", "Stones_Id|Parent_Stones_Id", "Stones_Key=400", new string[] { "Stones_Key=120", "Stones_Name=200" }, new string[] { "拼音", "名称" }, "Stones_Id", "Level>0", "Stones_Key", "Stones_Id", "Parent_Stones_Id", "", true);
            #endregion

            #region 绑定基础工艺
            StaticFunctions.BindDplComboByTable(extTreeTech, dsLoad.Tables[2], "Tec_Name", "Tec_Id|Parent_Tec_Id", "Tec_Key=400", new string[] { "Tec_Key=120", "Tec_Name=200" }, new string[] { "拼音", "名称" }, "Tec_Id", "Level>0", "Tec_Key", "Tec_Id", "Parent_Tec_Id", "", true);
            #endregion

            #region 绑定表面工艺
            StaticFunctions.BindDplComboByTable(extPThceSur, dsLoad.Tables[6], "Sur_Name", "Sur_Id|Parent_Sur_Id", "Sur_Key=400", new string[] { "Sur_Key=120", "Sur_Name=200" }, new string[] { "拼音", "名称" }, "Sur_Id", "Level>0", "Sur_Key", "Sur_Id", "Parent_Sur_Id", "", true);
            #endregion

            #region 绑定花型
            StaticFunctions.BindDplComboByTable(extPFlowerType, dsLoad.Tables[7], "Flow_Name", "Flow_Id|Parent_Flow_Id", "Flow_Key=400", new string[] { "Flow_Key=120", "Flow_Name=200" }, new string[] { "拼音", "名称" }, "Flow_Id", "Level>0", "Flow_Key", "Flow_Id", "Parent_Flow_Id", "", true);
            #endregion

            #region 绑定边型
            StaticFunctions.BindDplComboByTable(extPSideType, dsLoad.Tables[8], "Squ_Name", "Squ_Id|Parent_Squ_Id", "Squ_Key=400", new string[] { "Squ_Key=120", "Squ_Name=200" }, new string[] { "拼音", "名称" }, "Squ_Id", "Level>0", "Squ_Key", "Squ_Id", "Parent_Squ_Id", "", true);
            #endregion

            #region 绑定圈口
            StaticFunctions.BindDplComboByTable(extPRound, dsLoad.Tables[9], "Rou_Name", "Rou_Id|Parent_Rou_Id", "Rou_Key=400", new string[] { "Rou_Key=120", "Rou_Name=200" }, new string[] { "拼音", "名称" }, "Rou_Id", "Level>0", "Rou_Key", "Rou_Id", "Parent_Rou_Id", "", true);
            #endregion

            #region 绑定面宽
            StaticFunctions.BindDplComboByTable(extPFaceWith, dsLoad.Tables[10], "Fac_Name", "Fac_Id|Parent_Fac_Id", "Fac_Key=400", new string[] { "Fac_Key=120", "Fac_Name=200" }, new string[] { "拼音", "名称" }, "Fac_Id", "Level>0", "Fac_Key", "Fac_Id", "Parent_Fac_Id", "", true);
            #endregion

            #region 绑定扣型
            StaticFunctions.BindDplComboByTable(extPFastener, dsLoad.Tables[11], "Fas_Name", "Fas_Id|Parent_Fas_Id", "Fas_Key=400", new string[] { "Fas_Key=120", "Fas_Name=200" }, new string[] { "拼音", "名称" }, "Fas_Id", "Level>0", "Fas_Key", "Fas_Id", "Parent_Fas_Id", "", true);
            #endregion

            #region 绑定结构
            StaticFunctions.BindDplComboByTable(extPStructure, dsLoad.Tables[12], "Str_Name", "Str_Id|Parent_Str_Id", "Str_Key=400", new string[] { "Str_Key=120", "Str_Name=200" }, new string[] { "拼音", "名称" }, "Str_Id", "Level>0", "Str_Key", "Str_Id", "Parent_Str_Id", "", true);
            #endregion

            string[] strKeyBus = "EUser_Id,EDept_Id,Fy_Id,Company_Id,Flag".Split(",".ToCharArray());
            string[] strValBus = new string[] {
                CApplication.App.CurrentSession.UserId.ToString(),
                     CApplication.App.CurrentSession.DeptId.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                //CApplication.App.CurrentSession.Company_Id.ToString(),
                     CApplication.App.CurrentSession.FyId.ToString(),
                "9"
            };
            DataSet dsLoadBus = this.DataRequest_By_DataSet(strSpName, strKeyBus, strValBus);

            #region 绑定营销类别
            StaticFunctions.BindDplComboByTable(extBus_Pc_Id, dsLoadBus.Tables[0], "Kind_Name", "Kind_Id|Parent_Kind_Id", "Kind_Key=400", new string[] { "Kind_Key=120", "Kind_Name=200" }, new string[] { "拼音", "名称" }, "Kind_Id", "Level>0", "Kind_Key", "Kind_Id", "Parent_Kind_Id", "", true);
            #endregion
            #region 绑定营销属性1
            StaticFunctions.BindDplComboByTable(extBusiness_Type1, dsLoadBus.Tables[1], "Attr_Name", "Attr_Id|Parent_Attr_Id", "Attr_Key=400", new string[] { "Attr_Key=120", "Attr_Name=200" }, new string[] { "拼音", "名称" }, "Attr_Id", "Level>0", "Attr_Key", "Attr_Id", "Parent_Attr_Id", "", true);
            #endregion
            #region 绑定营销属性2
            StaticFunctions.BindDplComboByTable(extBusiness_Type2, dsLoadBus.Tables[2], "Attr_Name", "Attr_Id|Parent_Attr_Id", "Attr_Key=400", new string[] { "Attr_Key=120", "Attr_Name=200" }, new string[] { "拼音", "名称" }, "Attr_Id", "Level>0", "Attr_Key", "Attr_Id", "Parent_Attr_Id", "", true);
            #endregion
            #region 绑定营销属性3
            StaticFunctions.BindDplComboByTable(extBusiness_Type3, dsLoadBus.Tables[3], "Attr_Name", "Attr_Id|Parent_Attr_Id", "Attr_Key=400", new string[] { "Attr_Key=120", "Attr_Name=200" }, new string[] { "拼音", "名称" }, "Attr_Id", "Level>0", "Attr_Key", "Attr_Id", "Parent_Attr_Id", "", true);
            #endregion
            #region 绑定产品类型
            StaticFunctions.BindDplComboByTable(dplBus_Bind, dsLoadBus.Tables[4], "SetText", "SetValue",
                                                new string[] { "SetValue", "SetText" },
                                                new string[] { "序号", "产品类型" }, true, "", "", false);
            //lookSex.ItemIndex = -1;
            #endregion


            #region 绑定柜台
            StaticFunctions.BindDplComboByTable(dplBus_Counter, dsLoadBus.Tables[5], "Name", "Counter_Id",
                                                new string[] { "Counter_Id", "Name" },
                                                new string[] { "序号", "名称" }, true, "", "", false);
            #endregion

            #region 绑定系列
            StaticFunctions.BindDplComboByTable(dplseries, dsLoadBus.Tables[6], "Name", "Series_Id",
                                                new string[] { "Series_Id", "Name" },
                                                new string[] { "序号", "名称" }, true, "", "", false);
            #endregion

            LoadData();
            SetBtnTxt(dt.Rows[0]["StateUndetermined"].ToString());
            StrMode = "View";
            SetMode(StrMode);
        }