private void ReceiptModalConfigForm_Load(object sender, EventArgs e) { InitFuncs initFuncs = new InitFuncs(); initFuncs.InitComboBox(this.comboBoxReceName, "T_ReceiptModal", "ReceName"); initFuncs.InitComboBox(this.comboBoxReceiptTypeID, "T_ReceiptModal", "ReceTypeID"); }
private void FormCustomerMaInvoiceAdd_Load(object sender, EventArgs e) { InitFuncs inf = new InitFuncs(); //inf.InitComboBox(this.t_IType, "[发票]发票种类"); inf.InitComboBox(this.t_IType, "T_Invoice", "ITName"); //发票类型 inf.InitComboBox(this.t_kpcorp, "T_StoreHouse", "SHName"); //所属公司 //开票内容,从物料表中取,要对应到具体的物料(以A打头的物料) this.s_matid.Items.Clear(); string matid_ = "", matname_ = ""; string sql_ = "select matid,matname from T_matinf where Matid like 'A%'"; DataTable dt = (new SqlDBConnect()).Get_Dt(sql_); for (int m = 0; m < dt.Rows.Count; m++) { matid_ = dt.Rows[m]["matid"].ToString().Trim(); matname_ = dt.Rows[m]["matname"].ToString().Trim(); this.s_matid.Items.Add("[" + matid_ + "]" + matname_); } // s_CmSysId.Text = Cmsysid; if (this.type == "edit") { string strSql = "select * from T_CustomerMaInvoice where CmSysId='{0}'and sysid='{1}'"; strSql = string.Format(strSql, this.Cmsysid, this.sysid); (new InitFuncs()).ShowDatas(this.panelkp, strSql); this.t_kpcorp.Text = (new DBUtil()).Get_Single_val("T_StoreHouse", "Shname", "shid", this.s_kpcorp.Text.Trim()); this.t_IType.Text = (new DBUtil()).Get_Single_val("T_Invoice", "ITName", "Itcode", this.s_IType.Text.Trim()); } }
/// <summary> /// 初始化绑定ComboBox /// </summary> private void InitComboBox() { //初始化ComboBox InitFuncs initFuncs = new InitFuncs(); initFuncs.InitComboBox(this.comboBoxMainMenu, "T_MenuCfgMain", "MainMenu"); initFuncs.InitComboBox(this.comboBoxReceName, "T_ReceiptModal", "ReceName"); }
private void BargainForm_Load(object sender, EventArgs e) { //限制值类型文本框的输入 (new InitFuncs()).Num_limited(this.panel1); s_SaleUser.KeyDown += new KeyEventHandler(InfoFind.UserName_KeyDown); // 合同:无码数据初始化 InitFuncs inf = new InitFuncs(); //inf.InitComboBox(this.s_ResponseHour, "[合同]响应速度"); inf.InitComboBox(this.t_ContMaintetype, "[合同]签约类型"); //区域:有码数据初始化 inf.InitComboBox(this.t_UseType, "TB_machusedtype", "usedname"); //区域 inf.InitComboBox(this.t_ContMaintetype, "tb_maintetype", "maintetypename"); //保修类别 //合同:有码数据初始化 s_Jftype.SelectedIndex = 0; s_ContractType.SelectedIndex = 0; t_ContMaintetype.SelectedIndex = 0; s_FeeType.SelectedIndex = 0; s_PreChargeMethod.SelectedIndex = 0; s_Payouttype.SelectedIndex = 0; if (this.Type == "add") { this.s_Bargstatus.SelectedIndex = 1; s_BargId.ReadOnly = false; this.panel3.Enabled = false; //不允许设置相关物料 //this.panel4.Enabled = false; } else if (this.Type == "edit") { this.panel3.Enabled = true; //this.panel4.Enabled = true; string sel_sql = "select * from T_Bargains where sysid=" + this.BargSysId; inf.ShowDatas(this.panel1, sel_sql); //以下两行必须在ShowDatas后 t_CustCode.Text = (new DBUtil()).Get_Single_val("T_CustomerInf", "custname", "custid", s_CustCode.Text.Trim()); this.custid_ = s_CustCode.Text.Trim(); this.t_UseType.Text = (new DBUtil()).Get_Single_val("TB_machusedtype", "usedname", "used_type", this.s_UseType.Text.Trim()); this.t_ContMaintetype.Text = (new DBUtil()).Get_Single_val("tb_maintetype", "maintetypename", "maintetypecode", this.s_ContMaintetype.Text.Trim()); this.t_CustCode.Text = (new DBUtil()).Get_Single_val("T_CustomerMac", "Mdepart", "sysid", this.n_MachineId.Text.Trim()); //显示计费用信息 show_fee_lst(this.BargSysId); } }
private void UserRelationForm_Load(object sender, EventArgs e) { string strUserName = (new DBUtil()).Get_Single_val("T_Users", "UserName", "UserId", this.userId); this.txtCurUserName.Text = strUserName; InitFuncs initFuncs = new InitFuncs(); initFuncs.InitComboBox(this.comboBoxUserType, "T_UserType", "UtypeName"); initFuncs.InitComboBox(this.comboBoxUserGrade, "T_UserGrade", "Gname"); InitDataGridView(); }
private void FinancialForm_Load(object sender, EventArgs e) { InitFuncs initFuncs = new InitFuncs(); initFuncs.InitComboBox(this.comboBoxPayMethod, "T_PayMethod", "PMName"); this.txtCustId.KeyDown += new KeyEventHandler(InfoFind.CustId_KeyDown); this.txtCustName.KeyDown += new KeyEventHandler(InfoFind.CustName_KeyDown); if (this.financialType == "收入") { this.Text = "应收账务核销"; this.labelInfo.Text = "应收账务"; this.btnAutoVeri.Visible = false; } if (this.financialType == "支出") { this.Text = "应付账务核销"; this.labelInfo.Text = "应付账务"; this.btnAutoVeri.Visible = true; } this.curUserName = (this.MdiParent as MainForm).userName; this.curWorkMonth = (this.MdiParent as MainForm).curWorkMonth;//获得主窗体的当前工作月 this.txtCustId.Focus(); }
private void BargainBindAddhctype_Load(object sender, EventArgs e) { (new InitFuncs()).Num_limited(this.panel1); //初始化无码数据 InitFuncs inf = new InitFuncs(); inf.InitComboBox(this.s_HcType, "[合同]幅面"); }
private void FormCopySettleInvoiceAdddet_Load(object sender, EventArgs e) { //限制值类型文本框的输入 (new InitFuncs()).Num_limited(this.panel1); InitFuncs inf = new InitFuncs(); inf.InitComboBox(this.t_Itype, "T_Invoice", "ITName"); //发票类型 inf.InitComboBox(this.t_kpcorp, "T_StoreHouse", "SHName"); //所属公司 //开票内容,从物料表中取,要对应到具体的物料(以A打头的物料) this.s_Icontent.Items.Clear(); string matid_ = "", matname_ = ""; string sql_ = "select matid,matname from T_matinf where Matid like 'A%'"; DataTable dt = (new SqlDBConnect()).Get_Dt(sql_); for (int m = 0; m < dt.Rows.Count; m++) { matid_ = dt.Rows[m]["matid"].ToString().Trim(); matname_ = dt.Rows[m]["matname"].ToString().Trim(); this.s_Icontent.Items.Add("[" + matid_ + "]" + matname_); } // this.s_SaleUser.KeyDown += new KeyEventHandler(InfoFind.UserName_KeyDown); this.s_Techuser.KeyDown += new KeyEventHandler(InfoFind.UserName_KeyDown); //t_Itype.SelectedIndex = this.t_Itype.Items.IndexOf(Itype); s_Ititle.Text = this.Ititle; s_Icontent.Text = this.Icontent; n_Inum.Text = this.Inum; n_Iprice.Text = this.Iprice; n_Imoney.Text = this.Imoney; s_Techuser.Text = this.Itech; s_SaleUser.Text = this.IsaleUser; this.s_kpcorp.Text = (new DBUtil()).Get_Single_val("T_StoreHouse", "Shid", "shname", this.kpcorp); this.s_Itype.Text = (new DBUtil()).Get_Single_val("T_Invoice", "ITcode", "Itname", this.Itype); s_Memo.Text = this.Imemo; s_groups.SelectedIndex = this.s_groups.Items.IndexOf(this.Igroup); this.t_kpcorp.Text = (new DBUtil()).Get_Single_val("T_StoreHouse", "Shname", "shid", this.s_kpcorp.Text.Trim()); this.t_Itype.Text = (new DBUtil()).Get_Single_val("T_Invoice", "ITName", "Itcode", this.s_Itype.Text.Trim()); }
private void MatSplitMainForm_Load(object sender, EventArgs e) { InitFuncs initFuncs = new InitFuncs(); string strWhere = "select distinct MatName from T_Mat_Rela,T_MatInf where T_Mat_Rela.ParentMatID=T_MatInf.MatID"; initFuncs.InitComboBox(this.comboBoxMatName, "MatName", strWhere, 1); this.txtCurUserName.Text = this.curUserName;//获取当前登陆用户名 initFuncs.InitComboBox(this.comboBoxMatType, "[物料]被拆物料类型"); this.s_OpaUser.Text = (new DBUtil()).Get_Single_val("T_Users", "UserId", "UserName", this.curUserName.Trim()); if (this.type == "edit") { //this.comboBoxOperateType.Text = Util.GetOperateTypeName(this.OperateType); this.comboBoxMatName.Items.Clear();//编辑时,不允许修改被拆物料 this.s_ReceiptId.ReadOnly = true; ShowDatas(); } }
private void MacModelFormAdd_Load(object sender, EventArgs e) { //限制值类型文本框的输入 (new InitFuncs()).Num_limited(this.panelmodel); InitFuncs inf = new InitFuncs(); //无码初始化 inf.InitComboBox(this.s_ProdCtgrID, "[机型]分类"); inf.InitComboBox(this.s_ModelType, "[机型]机型类别"); inf.InitComboBox(this.s_ModelGrade, "[机型]机器等级"); inf.InitComboBox(this.s_Modelbrand, "[机型]品牌"); if (this.type == "edit") { string strsql = "select * from T_Model where SysID='{0}'"; strsql = string.Format(strsql, this.ID); (new InitFuncs()).ShowDatas(this.panelmodel, strsql); } }
private void FormCustAdressadd_Load(object sender, EventArgs e) { InitFuncs inf = new InitFuncs(); inf.InitComboBox(this.s_AddType, "[地址]地址种类"); s_CustID.Text = this.custid; if (this.type == "edit") { string strSql = "select * from T_CustomerAdd where CustID='{0}' and sysid={1}"; strSql = string.Format(strSql, this.custid, this.sysid_); (new InitFuncs()).ShowDatas(this.panel1, strSql); } }
private void UserRoleForm_Load(object sender, EventArgs e) { //初始化DataGridView InitDataGridView(); //初始化ComboBox InitFuncs initFuncs = new InitFuncs(); initFuncs.InitComboBox(this.comboBoxRole, "T_Roles", "RoleName"); string strUserName = (new DBUtil()).Get_Single_val("T_Users", "UserName", "UserId", this.userId); this.txtUserName.Text = strUserName; }
private void EditUserForm_Load(object sender, EventArgs e) { //初始化ComboBox InitFuncs initFuncs = new InitFuncs(); initFuncs.InitComboBox(this.comboBoxBranch, "T_Branch", "BName"); initFuncs.InitComboBox(this.comboBoxType, "T_UserType", "UTypeName"); // 合同:无码数据初始化 initFuncs.InitComboBox(this.s_groups, "[用户]所属组"); DBUtil dbUtil = new DBUtil(); if (this.type == "edit") { string strSql = "select * from T_Users where UserId='{0}'"; strSql = string.Format(strSql, this.userId); initFuncs.ShowDatas(this.panelUser, strSql); //处理ComboBox this.comboBoxBranch.Text = dbUtil.Get_Single_val("T_Branch", "BName", "BId", this.s_BranchId.Text.Trim()); this.comboBoxType.Text = dbUtil.Get_Single_val("T_UserType", "UtypeName", "TypeId", this.s_DefaultUserType.Text.Trim()); //处理CheckBox //string strYNAdmin = UsersDAO.GetYNAdmin(this.userId); //if (strYNAdmin == "True") // this.s_ynAdmin.Checked = true; //else // this.s_ynAdmin.Checked = false; //处理确认密码 this.txtPasswordCheck.Text = (new DBUtil()).Get_Single_val("T_Users", "PassWord", "UserId", this.userId); this.s_UserId.ReadOnly = true; } }
private void Add_materialForm_Load(object sender, EventArgs e) { //限制值类型文本框的输入 (new InitFuncs()).Num_limited(this.panel1); //初始化界面 InitFuncs inf = new InitFuncs(); // inf.InitComboBox(s_Units, "[物料]计量单位"); //初始化“列”单位Units inf.InitComboBox(s_QualityDegree, "[物料]质量等级"); //初始化“列”质量等级QualityDegree inf.InitComboBox(this.s_ColorType, "[物料]色彩"); inf.InitComboBox(this.s_Format, "[物料]幅面"); inf.InitComboBox(this.s_Speed, "[物料]速度等级"); inf.InitComboBox(this.s_ProductType, "[物料]产品种类"); inf.InitComboBox(this.s_types, "[物料]机种"); inf.InitComboBox(this.s_ConfigType, "[物料]配置类型"); inf.InitComboBox(this.s_Brand, "[机型]品牌"); if (this.type == "edit") { s_MatID.ReadOnly = true; string strsql = "select * from T_MatInf where MatID='{0}'"; strsql = string.Format(strsql, this.matId); inf.ShowDatas(this.panel1, strsql); } else { s_MatID.ReadOnly = false; s_InputTime.Text = DBUtil.getServerTime().ToString(); this.s_MatID.Text = this.matId;//单据模块用 } }
private void FormCustMaContactsAdd_Load(object sender, EventArgs e) { InitFuncs inf = new InitFuncs(); inf.InitComboBox(this.s_CType, "[客户]联系人类别"); s_CmSysId.Text = Cmsysid; if (this.type == "edit") { string strSql = "select * from T_CustMaContacts where CmSysId='{0}'and sysid='{1}'"; strSql = string.Format(strSql, this.Cmsysid, this.sysid); (new InitFuncs()).ShowDatas(this.panellx, strSql); if (s_Sex.Text.Trim() == "男") { t_nan.Checked = true; } else { t_nu.Checked = true; } } }
private void FormCustMatAdd_Load(object sender, EventArgs e) { InitFuncs inf = new InitFuncs(); //无码初始化 inf.InitComboBox(this.t_MainteType, "[物料]品牌"); inf.InitComboBox(this.s_Degreed, "[客户]等级"); inf.InitComboBox(this.t_used_type, "[物料]机器种类"); inf.InitComboBox(this.s_install_result, "[机器]安装结果"); //区域:有码数据初始化 inf.InitComboBox(this.T_Areaid, "T_AreaInf", "Area"); //区域 //保修类型 inf.InitComboBox(this.t_MainteType, "tb_maintetype", "maintetypename"); //区域 //使用类型 inf.InitComboBox(this.t_used_type, "TB_machusedtype", "usedname"); //区域 if (this.type == "edit") { string strSql = "select * from T_CustomerMac where sysid={0}"; strSql = string.Format(strSql, this.Cmsysid); (new InitFuncs()).ShowDatas(this.panel1, strSql); this.T_CustID.Text = (new DBUtil()).Get_Single_val("T_CustomerInf", "custname", "custid", this.s_CustID.Text.Trim()); T_Areaid.Text = (new DBUtil()).Get_Single_val("T_AreaInf", "Area", "Areaid", s_Areaid.Text.Trim()); this.t_MainteType.Text = (new DBUtil()).Get_Single_val("tb_maintetype", "maintetypename", "maintetypecode", this.s_MainteType.Text.Trim()); this.t_used_type.Text = (new DBUtil()).Get_Single_val("TB_machusedtype", "usedname", "used_type", this.s_used_type.Text.Trim()); tabControl_CustomerMaInvoice.Enabled = true; } if (this.s_CustID.Text.Trim() != "") {//初始化联系人; init_lxr(); //初始化发票 init_fp(); } }
private void CustomerInfAdd_Load(object sender, EventArgs e) { //初始化ComboBox InitFuncs inf = new InitFuncs(); inf.InitComboBox(this.s_CustType, "[客户]类别"); inf.InitComboBox(this.s_Degree, "[客户]等级"); inf.InitComboBox(this.s_whichTrade, "[客户]所在行业"); inf.InitComboBox(this.s_Country, "[客户]国家"); inf.InitComboBox(this.s_Province, "[客户]省"); inf.InitComboBox(this.s_City, "[客户]城市"); inf.InitComboBox(this.t_AreaCode, "T_AreaInf", "Area"); inf.InitComboBox(this.t_ImportanceDegreeId, "T_CustomerImp", "importance"); if (custid.Trim() == "") { tabControl1.Enabled = false; } else { tabControl1.Enabled = true; } s_InputTime.Text = DBUtil.getServerTime().ToString(); if (this.type == "edit") { this.s_CustID.ReadOnly = true; string strsql = "select * from T_CustomerInf where CustID='{0}'"; strsql = string.Format(strsql, this.custid); inf.ShowDatas(this.panelcustomer, strsql); //以下两行必须在ShowDatas后 DBUtil dbUtil = new DBUtil(); t_AreaCode.Text = (new DBUtil()).Get_Single_val("T_AreaInf", "Area", "areaId", S_AreaCode.Text.Trim()); t_ImportanceDegreeId.Text = (new DBUtil()).Get_Single_val("T_CustomerImp", "importance", "Iid", S_ImportanceDegreeId.Text.Trim()); //初始化抬头 SqlDBConnect SDB = new SqlDBConnect(); s_BillHead.Clear(); string strSql = "select BillHead as 发票抬头 from T_CustomerTitle where CustID='{0}'";//"select * from T_SelItems where ItemType='{0}'"; strSql = string.Format(strSql, s_CustID.Text.Trim()); DataSet ds = SDB.Get_Ds(strSql); int Lins = ds.Tables[0].Rows.Count; string[] match = new string[ds.Tables[0].Rows.Count]; for (int i = 0; i < match.Length; i++) { s_BillHead.Text += ds.Tables[0].Rows[i]["发票抬头"].ToString() + "\r\n";//回车换行 } } if (this.custid != "") {//初始化联系人; init_lxr(); //初始化发票 init_fp(); //初始化多地址 init_muladd(); } //限制值类型文本框的输入 (new InitFuncs()).Num_limited(this.panelcustomer); }
private void AddWorkForm_Load(object sender, EventArgs e) { //限制值类型文本框的输入 (new InitFuncs()).Num_limited(this.panel1); this.lb_bargainType.Text = ""; this.lb_xysj.Text = ""; string sql_ = ""; //有码数据初始化 InitFuncs inf = new InitFuncs(); inf.InitComboBox(this.t_workResult, "TB_workResult", "repairstatusname"); //行动结果 inf.InitComboBox(this.t_ServiceType, "tb_maintetype", "maintetypename"); //服务类别 inf.InitComboBox(this.t_WorkType, "T_WorkType", "wcName"); //工作类别 inf.InitComboBox(this.t_WorkContent, "T_WorkType", "wcName"); //工作内容 // 无码数据初始化 inf.InitComboBox(this.s_wsStyle, "[派工]方式"); inf.InitComboBox(this.s_ActionResults, "[派工]行动结果"); inf.InitComboBox(this.s_UrgentDegree, "[召唤]紧急程度"); inf.InitComboBox(this.s_CallType, "[召唤]召唤类型"); inf.InitComboBox(this.s_wsStyle, "[召唤]方式"); inf.InitComboBox(this.s_ReportAttach, "[派工]报告附表"); inf.InitComboBox(this.s_ClearItem, "[派工]清洁项目"); inf.InitComboBox(this.s_ClearResult, "[派工]清洁结果"); inf.InitComboBox(this.s_Becauseof1, "[派工]取消原因"); inf.InitComboBox(this.s_Becauseof2, "[派工]原因备注"); //查询受理单编号 this.callid_ = (new DBUtil()).Get_Single_val("T_worksheet", "CallBillSysId", "sysid", this.sysid_); //显示受理单的相关内容(有受理单的情况) if (this.callid_.Trim() != "") { // 合同:无码数据初始化 this.panelWorkSheet.Visible = true; this.lb_zhd.Visible = true; this.n_CallBillSysId.Visible = true; //显示召唤单 Show_CustCall(this.callid_); t_CustCode.Text = (new DBUtil()).Get_Single_val("T_CustomerInf", "custname", "custid", s_CustCode.Text.Trim()); this.s_CustId.Text = this.s_CustCode.Text.Trim(); // t_WorkType.Text = (new DBUtil()).Get_Single_val("T_worktype", "wcname", "wcid", s_WorkType.Text.Trim()); } else { // 合同:无码数据初始化 this.panelWorkSheet.Visible = false; this.lb_zhd.Visible = false; this.n_CallBillSysId.Visible = false; this.Height = 325; } return; if (type == "add") { n_machineid.Text = this.machineid; //获取客户编号 this.custid_ = (new DBUtil()).Get_Single_val("t_CustomerMac", "custid", "sysid", this.machineid); this.s_mtype.Text = (new DBUtil()).Get_Single_val("t_CustomerMac", "mtype", "sysid", this.machineid); s_CustCode.Text = this.custid_; s_CustId.Text = this.custid_; t_CustCode.Text = (new DBUtil()).Get_Single_val("T_CustomerInf", "custname", "custid", this.custid_); s_wsCode.Focus(); } else { sql_ = "select * from T_workSheet where sysid=" + this.sysid_; inf.ShowDatas(this.panel1, sql_); this.machineid = this.n_machineid.Text.Trim(); //查找或获取关联值 t_CustCode.Text = (new DBUtil()).Get_Single_val("T_CustomerInf", "custname", "custid", s_CustCode.Text.Trim()); this.t_workResult.Text = (new DBUtil()).Get_Single_val("TB_workResult", "repairstatusname", "repairstatuscode", this.s_workResult.Text.Trim()); this.t_WorkContent.Text = (new DBUtil()).Get_Single_val("T_WorkType", "wcName", "wcid", this.s_WorkContent.Text.Trim()); this.t_ServiceType.Text = (new DBUtil()).Get_Single_val("tb_maintetype", "maintetypename", "maintetypecode", this.s_ServiceType.Text.Trim()); // if (s_AffectiveFlg.Text.ToLower().Trim() == "false") { radioButton1.Checked = true; radioButton2.Checked = false; } else { radioButton1.Checked = false; radioButton2.Checked = true; } } }
private void CustomerCallAdd_Load(object sender, EventArgs e) { string sql_ = ""; string curtime_ = ""; s_Technician1.KeyDown += new KeyEventHandler(InfoFind.UserName_KeyDown); s_Technician2.KeyDown += new KeyEventHandler(InfoFind.UserName_KeyDown); //区域:报修内容 (new InitFuncs()).InitComboBox(this.s_Teltrbtype, "T_TelTrbType", "telmemo"); //合同:有码数据初始化 (new InitFuncs()).InitComboBox(this.t_WorkType, "T_WorkType", "wcName"); //工作类别 // 合同:无码数据初始化 InitFuncs inf = new InitFuncs(); inf.InitComboBox(this.s_UrgentDegree, "[召唤]紧急程度"); inf.InitComboBox(this.s_ActionResults, "[召唤]行动结果"); DBUtil dbu = new DBUtil(); if (type == "add") { this.n_endflag.Text = "0"; //未派 s_operauser.Text = this.CurrentUser; n_cmsysid.Text = this.cmsysid; //根据Cmsysid得到<机型>、<机号>、<客户编号> this.s_mtype.Text = dbu.Get_Single_val("T_CustomerMac", "mType", "sysid", this.cmsysid); this.s_ManufactCode.Text = dbu.Get_Single_val("T_CustomerMac", "Manufactcode", "sysid", this.cmsysid); this.s_CustCode.Text = dbu.Get_Single_val("T_CustomerMac", "custid", "sysid", this.cmsysid); //获取预定技术员 this.s_Technician1.Text = dbu.Get_Single_val("T_CustomerMac", "ptech", "sysid", this.cmsysid); // curtime_ = DBUtil.getServerTime().ToString(); //查找或获取关联值 s_CallDate.Text = Convert.ToDateTime(curtime_).ToShortDateString(); s_CallTime.Text = Convert.ToDateTime(curtime_).ToShortTimeString(); } else { sql_ = "select * from T_CustomerCall where sysid=" + this.CallId; inf.ShowDatas(this.panelCustCall, sql_); this.cmsysid = this.n_cmsysid.Text.Trim(); // t_WorkType.Text = (new DBUtil()).Get_Single_val("T_worktype", "wcname", "wcid", s_WorkType.Text.Trim()); this.s_CallDate.Text = Convert.ToDateTime(s_CallDate.Text).ToShortDateString(); this.s_CallTime.Text = Convert.ToDateTime(s_CallTime.Text).ToShortTimeString(); if (n_endflag.Text == "已派") { btn_time.Visible = true; } else { btn_time.Visible = false; } } this.t_CustCode.Text = dbu.Get_Single_val("T_CustomerMac", "Mdepart", "sysid", this.cmsysid); //根据Cmsysid得到<合同信息>//得到合同类别 sql_ = "select ContractType from T_Bargains where MachineId=" + this.cmsysid; this.lb_bargainType.Text = "合同类别:" + dbu.Get_Single_val(sql_); //显示联系人列表 show_contacts(this.cmsysid); }
private void EditBargFeeForm_Load(object sender, EventArgs e) { //有免印张数,无免印张数,有基本张数 if (this.Jftype == "有基本张数") { this.n_MyNum.Text = ""; this.n_MyNum.ReadOnly = true; this.n_BaseNum.ReadOnly = false; } if (this.Jftype == "有免印张数") { this.n_BaseNum.Text = ""; this.n_MyNum.ReadOnly = false; this.n_BaseNum.ReadOnly = true; } if (this.Jftype == "无免印张数") { this.n_BaseNum.Text = ""; this.n_MyNum.Text = ""; this.n_MyNum.ReadOnly = true; this.n_BaseNum.ReadOnly = true; } //限制值类型文本框的输入 (new InitFuncs()).Num_limited(this.panel1); InitFuncs inf = new InitFuncs(); inf.InitComboBox(this.s_HcType, "[合同]幅面"); this.t_BargId.Text = this.BargId; s_HcType.SelectedIndex = 0; if (this.Type == "add") { //s_BargId.Text = this.BargId; n_barsysid.Text = this.BarSysId; this.s_HcType.Enabled = true; } else { string sql_ = "select * from T_bargFee where barsysid=" + this.BarSysId + " and hctype='" + this.hctype + "'"; (new InitFuncs()).ShowDatas(this.panel1, sql_); this.s_HcType.Enabled = false; } //有免印张数,无免印张数,有基本张数 if (this.Jftype == "有基本张数") { this.n_MyNum.Text = ""; this.n_MyNum.ReadOnly = true; this.n_BaseNum.ReadOnly = false; } if (this.Jftype == "有免印张数") { this.n_BaseNum.Text = ""; this.n_MyNum.ReadOnly = false; this.n_BaseNum.ReadOnly = true; } if (this.Jftype == "无免印张数") { this.n_BaseNum.Text = ""; this.n_MyNum.Text = ""; this.n_MyNum.ReadOnly = true; this.n_BaseNum.ReadOnly = true; } }