private void BindOper() { try { SecurityManage secruty = new SecurityManage(); DataTable dtOper = secruty.getAllOper(); cmbManager.DataSource = dtOper; cmbManager.ValueMember = "操作员ID"; cmbManager.DisplayMember = "操作员名称"; cmbManager.DataBind(); cmbManager3.DataSource = dtOper; cmbManager3.ValueMember = "操作员ID"; cmbManager3.DisplayMember = "操作员名称"; cmbManager3.DataBind(); } catch (BusinessException bex) { MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (System.Exception ex) { MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void BindOperFlag() { DataTable dtOperFlag = Helper.Query("select distinct cnvcOperFlag from tbOperLog"); cmbOperFlag.DataSource = dtOperFlag; cmbOperFlag.DataBind(); }
private void BindDept() { SecurityManage secruty = new SecurityManage(); DataTable dtDept = secruty.getAllDept(); cmbDept.DataSource = dtDept; cmbDept.ValueMember = "部门ID"; cmbDept.DisplayMember = "部门名称"; cmbDept.DataBind(); cmbDept.SelectedIndex = 0; cmbDept2.DataSource = dtDept; cmbDept2.ValueMember = "部门ID"; cmbDept2.DisplayMember = "部门名称"; cmbDept2.DataBind(); cmbDept2.SelectedIndex = 0; cmbDept3.DataSource = dtDept; cmbDept3.ValueMember = "部门ID"; cmbDept3.DisplayMember = "部门名称"; cmbDept3.DataBind(); cmbDept3.SelectedIndex = 0; BindOper(); }
private void MemberFileQuery_Load(object sender, System.EventArgs e) { //绑定会员状态 DataTable dtState = new DataTable(); //dtState.Columns.Add("cnvcState"); dtState.Columns.Add("会员状态"); DataRow drState0 = dtState.NewRow(); drState0["会员状态"] = ConstApp.Card_State_InUse; dtState.Rows.Add(drState0); DataRow drState1 = dtState.NewRow(); drState1["会员状态"] = ConstApp.Card_State_InLose; dtState.Rows.Add(drState1); DataRow drState2 = dtState.NewRow(); drState2["会员状态"] = ConstApp.Card_State_InAdd; dtState.Rows.Add(drState2); DataRow drState3 = dtState.NewRow(); drState3["会员状态"] = ConstApp.Card_State_InCallBack; dtState.Rows.Add(drState3); DataRow drState4 = dtState.NewRow(); drState4["会员状态"] = ConstApp.Card_State_NoCard; dtState.Rows.Add(drState4); cmbState.DataSource = dtState; cmbState.DataBind(); //cmbState.SelectedIndex = 0; ClientHelper.BindEnterpriseType(cmbEnterpriseType); ClientHelper.BindTrade(cmbTrade); cmbEndDateBegin.Format = "yyyy-MM-dd"; cmbEndDate.Format = "yyyy-MM-dd"; cmbEndDateBegin.Value = DateTime.Now; cmbEndDate.Value = DateTime.Now; cmdBeginDate.MaskInput = "yyyy-mm-dd hh:mm"; cmbEndDate2.MaskInput = "yyyy-mm-dd hh:mm"; cmdBeginDate.Value = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00"; cmbEndDate2.Value = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59"; //cmbEndDate.MaskInput = "yyyy-mm-dd"; this.ultraGrid1.Dock = DockStyle.Fill; this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortMulti; this.ultraGroupBox2.BorderStyle = Infragistics.Win.Misc.GroupBoxBorderStyle.None; this.ultraGroupBox2.BringToFront(); ClientHelper.BindMemberRight(cmbMemberRight); }
private void OperLogReport_Load(object sender, System.EventArgs e) { this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortMulti; cmbBeginDate.MaskInput = "yyyy-mm-dd hh:mm"; cmbEndDate.MaskInput = "yyyy-mm-dd hh:mm"; cmbBeginDate.Value = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00"; cmbEndDate.Value = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59"; DataTable dtOper = Helper.Query("select * from tbOper where cnvcOperName <> 'admin'"); cmbOperName.DataSource = dtOper; cmbOperName.DisplayMember = "cnvcOperName"; cmbOperName.ValueMember = "cnnOperID"; cmbOperName.DataBind(); Helper.BindSynch(cmbSynch); BindOperFlag(); this.ultraGrid1.Dock = DockStyle.Fill; this.ultraGroupBox1.BorderStyle = Infragistics.Win.Misc.GroupBoxBorderStyle.None; this.ultraGroupBox1.BringToFront(); //if (ClientHelper.idept.cnnDeptID != 0) //{ // if(!Login.constApp.alOperFunc.Contains("操作日志报表查询")) // { // this.btnQuery.Enabled = false; // } // if(!Login.constApp.alOperFunc.Contains("操作日志报表打印")) // { // this.ultraButton1.Enabled = false; // btnExcel.Enabled = false; // } //} }
private void cmbDept_ValueChanged(object sender, System.EventArgs e) { //初始化操作员 try { SecurityManage security = new SecurityManage(); DataTable dtOper = security.getAllOperByDept(cmbDept.SelectedItem.DataValue.ToString()); txtOperName.DataSource = dtOper; txtOperName.DisplayMember = "cnvcOperName"; txtOperName.ValueMember = "cnnOperID"; txtOperName.DataBind(); txtOperName.SelectedIndex = 0; } catch (BusinessException bex) { MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error); this.txtOperName.Focus(); //isLogin = false; } catch (System.Exception ex) { MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); //this.btnLogin.DialogResult = DialogResult.Cancel; } }
private void ShowRemain_Load(object sender, System.EventArgs e) { //Helper.BindJob(cmbShow); string strSql = "select * from tbJob where cndEndDate>=getdate() order by cndBeginDate"; // string strSql = "select * from tbJob order by cndBeginDate"; if (Login.constApp.strJobRemainBeginDate != "") { strSql = "select * from tbJob where convert(varchar(10),cndBeginDate,121)>='" + Login.constApp.strJobRemainBeginDate + "'"; if (Login.constApp.strJobRemainEndDate != "") { strSql += " and convert(varchar(10),cndEndDate,121)<='" + Login.constApp.strJobRemainEndDate + "'"; } strSql += " order by cndBeginDate"; } else { if (Login.constApp.strJobRemainEndDate != "") { strSql = "select * from tbJob where convert(varchar(10),cndEndDate,121)<='" + Login.constApp.strJobRemainEndDate + "'"; strSql += " order by cndBeginDate"; } } //JobManage jobManage = new JobManage(); DataTable dtJob = Helper.Query(strSql);//jobManage.GetAllJob(); cmbShow.DataSource = dtJob; cmbShow.ValueMember = "cnnID"; cmbShow.DisplayMember = "cnvcJobName"; cmbShow.DataBind(); }
private void BindParentDept() { SecurityManage secruty = new SecurityManage(); DataTable dtDept = secruty.getAllDept(); cmbParentDept.DataSource = dtDept; cmbParentDept.ValueMember = "部门ID"; cmbParentDept.DisplayMember = "部门名称"; cmbParentDept.DataBind(); cmbParentDept.SelectedIndex = 0; //cmbParentDept.FindString("云南人才市场"); cmbParentDept2.DataSource = dtDept; cmbParentDept2.ValueMember = "部门ID"; cmbParentDept2.DisplayMember = "部门名称"; cmbParentDept2.DataBind(); cmbParentDept2.SelectedIndex = 0; //cmbParentDept2.FindString("云南人才市场"); cmbParentDept3.DataSource = dtDept; cmbParentDept3.ValueMember = "部门ID"; cmbParentDept3.DisplayMember = "部门名称"; cmbParentDept3.DataBind(); cmbParentDept3.SelectedIndex = 0; //cmbParentDept3.FindString("云南人才市场"); this.ultraGrid1.DataSource = dtDept; this.ultraGrid1.DataBind(); BindOper(); }
private void BindDept() { DataTable dtDept = getDept(); cmbDept.DataSource = dtDept; cmbDept.DisplayMember = "cnvcDeptName"; cmbDept.ValueMember = "cnnDeptID"; cmbDept.DataBind(); }
/**************************************************************************************************** * NAME : Common_StopBits_DataBinding * * DESCRIPTION : Initial ComboEditorBox datasource load when the form load funcrion . * * WRITTEN BY : PrabakaranG * * DATE : 20Mar15 * ****************************************************************************************************/ private void Common_StopBits_DataBinding(Infragistics.Win.UltraWinEditors.UltraComboEditor UCE_StopBits_Control) { DataTable dt = clsCommon.getStopBits(); UCE_StopBits_Control.ValueMember = "ValueText"; UCE_StopBits_Control.DisplayMember = "DisplayText"; UCE_StopBits_Control.DataSource = dt; UCE_StopBits_Control.DataBind(); UCE_StopBits_Control.SelectedIndex = 0; }
private void ShowBookSetting_Load(object sender, System.EventArgs e) { JobManage jobManage = new JobManage(); DataTable dtJob = jobManage.GetAllJob(); cmbShow.DataSource = dtJob; cmbShow.ValueMember = "cnnID"; cmbShow.DisplayMember = "cnvcJobName"; cmbShow.DataBind(); cmbShow.SelectedIndex = 0; BindSeat(); }
private void Login_Load(object sender, System.EventArgs e) { //初始化部门 //getAllDept if (CheckForUpdate.IsUpdate()) { //this.Close(); Application.Exit(); Process.Start("AutoUpdate.exe"); return; } //this.Visible = false; if (File.Exists(Application.StartupPath + @"\BatchScript.bat") && File.Exists(Application.StartupPath + @"\Script.sql")) { Process.Start("BatchScript.bat"); } if (File.Exists(Application.StartupPath + @"\AutoUpdate.exe.delete")) { //Process.Start("BatchScript.bat"); File.Delete(Application.StartupPath + @"\AutoUpdate.exe.delete"); } try { SecurityManage security = new SecurityManage(); DataTable dtDept = security.getAllDept(); cmbDept.DataSource = dtDept; cmbDept.DisplayMember = "部门名称"; cmbDept.ValueMember = "部门ID"; cmbDept.DataBind(); cmbDept.SelectedIndex = 0; } catch (BusinessException bex) { MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error); this.txtOperName.Focus(); //isLogin = false; } catch (System.Exception ex) { MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); //this.btnLogin.DialogResult = DialogResult.Cancel; } }
private void ShowPlan2Floor_Load(object sender, System.EventArgs e) { DataTable dtDirection = new DataTable(); dtDirection.Columns.Add("朝向"); DataRow drDirection1 = dtDirection.NewRow(); drDirection1["朝向"] = "上"; dtDirection.Rows.Add(drDirection1); DataRow drDirection2 = dtDirection.NewRow(); drDirection2["朝向"] = "下"; dtDirection.Rows.Add(drDirection2); DataRow drDirection3 = dtDirection.NewRow(); drDirection3["朝向"] = "左"; dtDirection.Rows.Add(drDirection3); DataRow drDirection4 = dtDirection.NewRow(); drDirection4["朝向"] = "右"; dtDirection.Rows.Add(drDirection4); //this.cmbDirection.DropDownStyle = UltraComboStyle.DropDown; cmbDirection.DataSource = dtDirection; cmbDirection.ValueMember = "朝向"; cmbDirection.DisplayMember = "朝向"; cmbDirection.DataBind(); cmbDirection.SelectedIndex = 0; JobManage jobManage = new JobManage(); DataTable dtJob = jobManage.GetAllJob(); cmbShow.DataSource = dtJob; cmbShow.ValueMember = "cnnID"; cmbShow.DisplayMember = "cnvcJobName"; cmbShow.DataBind(); //cmbShow.SelectedIndex = 0; this.panel1.Controls.Clear(); }
private void JobEnd_Load(object sender, System.EventArgs e) { try { JobManage jobManage = new JobManage(); DataTable dtJob = jobManage.GetAllJob(); cmbShow.DataSource = dtJob; cmbShow.ValueMember = "cnnID"; cmbShow.DisplayMember = "cnvcJobName"; cmbShow.DataBind(); cmbShow.SelectedIndex = 0; } catch (BusinessException bex) { MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (System.Exception ex) { MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void BillRepeat_Load(object sender, System.EventArgs e) { //初始化操作员 SecurityManage security = new SecurityManage(); DataTable dtOper = security.getOpers(); cmbOperName.DataSource = dtOper; cmbOperName.DisplayMember = "cnvcOperName"; cmbOperName.ValueMember = "cnnOperID"; cmbOperName.DataBind(); cmbBillType.Items.Add(ConstApp.Bill_Type_AddPrepay); cmbBillType.Items.Add(ConstApp.Bill_Type_InMoney); cmbBillType.Items.Add(ConstApp.Bill_Type_Provide); cmbBillType.Items.Add(ConstApp.Bill_Type_SignIn); cmbBillType.Items.Add("预订"); this.cmbBeginDate.MaskInput = "yyyy-mm-dd hh:mm"; cmbEndDate.MaskInput = "yyyy-mm-dd hh:mm"; this.cmbBeginDate.Value = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00"; cmbEndDate.Value = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59"; //cmbOperName.Items.Add("%","*"); }
private void MemberFileQuery_Load(object sender, System.EventArgs e) { //绑定会员状态 DataTable dtState = new DataTable(); //dtState.Columns.Add("cnvcState"); dtState.Columns.Add("会员状态"); DataRow drState0 = dtState.NewRow(); drState0["会员状态"] = ConstApp.Card_State_InUse; dtState.Rows.Add(drState0); DataRow drState1 = dtState.NewRow(); drState1["会员状态"] = ConstApp.Card_State_InLose; dtState.Rows.Add(drState1); DataRow drState2 = dtState.NewRow(); drState2["会员状态"] = ConstApp.Card_State_InAdd; dtState.Rows.Add(drState2); DataRow drState3 = dtState.NewRow(); drState3["会员状态"] = ConstApp.Card_State_InCallBack; dtState.Rows.Add(drState3); DataRow drState4 = dtState.NewRow(); drState4["会员状态"] = ConstApp.Card_State_NoCard; dtState.Rows.Add(drState4); cmbState.DataSource = dtState; cmbState.DataBind(); //cmbState.SelectedIndex = 0; ClientHelper.BindEnterpriseType(cmbEnterpriseType); ClientHelper.BindTrade(cmbTrade); cmbEndDateBegin.Format = "yyyy-MM-dd"; cmbEndDate.Format = "yyyy-MM-dd"; cmbEndDateBegin.Value = DateTime.Now; cmbEndDate.Value = DateTime.Now; cmdBeginDate.MaskInput = "yyyy-mm-dd hh:mm"; cmbEndDate2.MaskInput = "yyyy-mm-dd hh:mm"; cmdBeginDate.Value = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00"; cmbEndDate2.Value = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59"; //cmbEndDate.MaskInput = "yyyy-mm-dd"; this.ultraGrid1.Dock = DockStyle.Fill; this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortMulti; this.ultraGroupBox2.BorderStyle = Infragistics.Win.Misc.GroupBoxBorderStyle.None; this.ultraGroupBox2.BringToFront(); ClientHelper.BindMemberRight(cmbMemberRight); PopulateValueList(); //if (ClientHelper.idept.cnnDeptID != 0) //{ // if(!Login.constApp.alOperFunc.Contains("会员档案报表查询")) // { // this.btnQuery.Enabled = false; // } // if(!Login.constApp.alOperFunc.Contains("会员档案报表打印")) // { // this.btnPrint.Enabled = false; // this.btnExcel.Enabled = false; // } // if(!Login.constApp.alOperFunc.Contains("会员档案报表修改")) // { // //this.btnPrint.Enabled = false; // this.btnModify.Enabled = false; // } //} ClientHelper.BindSales(cmbSales, this.oper.cnnOperID.ToString()); ClientHelper.BindSales(cmbCustomerService, this.oper.cnnOperID.ToString()); }
private void InMoneyReport_Load(object sender, System.EventArgs e) { this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortMulti; ClientHelper.BindMemberRight(cmbMemberRight); cmbBeginDate.MaskInput = "yyyy-mm-dd hh:mm"; cmbEndDate.MaskInput = "yyyy-mm-dd hh:mm"; cmbBeginDate.Value = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00"; cmbEndDate.Value = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59"; DataTable dtOper = Helper.Query("select * from tbOper where cnvcOperName <> 'admin'"); cmbOperName.DataSource = dtOper; cmbOperName.DisplayMember = "cnvcOperName"; cmbOperName.ValueMember = "cnnOperID"; //绑定会员状态 DataTable dtState = new DataTable(); //dtState.Columns.Add("cnvcState"); dtState.Columns.Add("会员状态"); DataRow drState0 = dtState.NewRow(); //drState0["cnvcState"] = "0"; drState0["会员状态"] = ConstApp.Card_State_InUse; dtState.Rows.Add(drState0); DataRow drState1 = dtState.NewRow(); //drState1["cnvcState"] = "1"; drState1["会员状态"] = ConstApp.Card_State_InLose; dtState.Rows.Add(drState1); DataRow drState2 = dtState.NewRow(); //drState2["cnvcState"] = "2"; drState2["会员状态"] = ConstApp.Card_State_InAdd; dtState.Rows.Add(drState2); DataRow drState3 = dtState.NewRow(); //drState2["cnvcState"] = "2"; drState3["会员状态"] = ConstApp.Card_State_InCallBack; dtState.Rows.Add(drState3); cmbState.DataSource = dtState; //cmbState.DisplayMember = "会员状态"; //cmbState.ValueMember = "cnvcState"; cmbState.DataBind(); //cmbState.SelectedIndex = 0; //Helper.BindJob(cmbShow); this.ultraGrid1.Dock = DockStyle.Fill; this.ultraGroupBox1.BorderStyle = Infragistics.Win.Misc.GroupBoxBorderStyle.None; this.ultraGroupBox1.BringToFront(); //if (ClientHelper.idept.cnnDeptID != 0) //{ // if(!Login.constApp.alOperFunc.Contains("充值报表查询")) // { // this.btnQuery.Enabled = false; // } // if(!Login.constApp.alOperFunc.Contains("充值报表打印")) // { // this.ultraButton1.Enabled = false; // btnExcel.Enabled = false; // } //} }