public void btnSave_Click() { if (string.IsNullOrEmpty(CmbPrinter.Text)) { prt_PrinterName.Text = null; } if (CmbStat.Text.Trim() == "") { CmbStat.Text = ""; CmbStat.Focus(); return; } //if (CMbSys.Text.Trim() == "") //{ // CMbSys.Text = ""; // CMbSys.Focus(); // return; //} if (txtReportName.Text.Trim() == "") { txtReportName.Text = ""; txtReportName.Focus(); return; } addCheck(); }
public void btnSave_Click() { if (string.IsNullOrEmpty(CmbStat.Text.Trim())) { CmbStat.Text = ""; CmbStat.Focus(); return; } if (this.Textfield2.Text.Trim() == "") { Textfield2.Text = ""; Textfield2.Focus(); return; } else if (this.Textfield3.Text.Trim() == "") { Textfield3.Text = ""; Textfield3.Focus(); return; } DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_PRINTER_SP", new List <IFields>() { dal.CreateIFields() .Append("Option", "check") .Append("prt_ROWID", txtRowID.Text) .Append("prt_STAT", CmbStat.SelectedItem.Value) .Append("prt_PrinterCode", this.Textfield2.Text.ToUpper()) .Append("prt_PrinterName", this.Textfield3.Text.ToUpper()) }).GetTable(); if (int.Parse(dt.Rows[0][0].ToString().Trim()) == 1) { X.Msg.Alert("status", "Printer already exists", new JFunction() { Fn = "textResult" }).Show(); return; } addSave(dt); }
public void ComboboxBind() { DataTable dt = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_USER_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "CompanyBind") }).GetTable(); if (dt != null && dt.Rows.Count > 0) { CmbStat.GetStore().DataSource = dt; CmbStat.GetStore().DataBind(); } DataTable dtid = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_USER_SP", new List <IFields>() { dal.CreateIFields().Append("Option", "CompanyIDBind") }).GetTable(); if (dtid != null && dtid.Rows.Count > 0) { cmbCompany.GetStore().DataSource = dtid; cmbCompany.GetStore().DataBind(); } }