public List <DataTable> VoucherTypeNameComboFillAdvanceRegister() { List <DataTable> ListObj = new List <DataTable>(); try { ListObj = spAdvancePayment.VoucherTypeNameComboFillAdvanceRegister(); } catch (Exception ex) { MessageBox.Show("AP12:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(ListObj); }
public ActionResult GetAttendanceReigsterDetails(string voucherNo, string employeeCode, string employeeName, string salaryMonth, string voucherType) { string jsonComboData = string.Empty; string jsonTableData = string.Empty; try { DataTable dtblAdvancePayment = new DataTable(); AdvancePaymentSP spAdvanceRegister = new AdvancePaymentSP(); if (voucherNo == null) { voucherNo = string.Empty; } if (employeeCode == null) { employeeCode = string.Empty; } if (employeeName == null) { employeeName = string.Empty; } DateTime dateTime = Convert.ToDateTime(salaryMonth); salaryMonth = dateTime.ToString("MMMM yyyy"); dtblAdvancePayment = spAdvanceRegister.AdvanceRegisterSearch(voucherNo, employeeCode, employeeName, salaryMonth, voucherType); jsonTableData = Utils.ConvertDataTabletoString(dtblAdvancePayment); AdvancePaymentSP spAdvancePaymentSP = new AdvancePaymentSP(); DataTable dtblVoucherTypeName = new DataTable(); dtblVoucherTypeName = spAdvancePaymentSP.VoucherTypeNameComboFillAdvanceRegister(); DataRow dr = dtblVoucherTypeName.NewRow(); dr[0] = "0"; dr[1] = "All"; dtblVoucherTypeName.Rows.InsertAt(dr, 0); jsonComboData = Utils.ConvertDataTabletoString(dtblVoucherTypeName); } catch (Exception ex) { return(Json(new { success = "true", ex = "AR2:" + ex.Message, tableData = string.Empty, comboData = string.Empty })); } return(Json(new { success = "true", ex = "no", tableData = jsonTableData, comboData = jsonComboData })); }
/// <summary> /// Function to fill cmbVoucherType combobox /// </summary> public void VoucherTypeNameComboFill() { try { AdvancePaymentSP spAdvancePaymentSP = new AdvancePaymentSP(); DataTable dtblVoucherTypeName = new DataTable(); dtblVoucherTypeName = spAdvancePaymentSP.VoucherTypeNameComboFillAdvanceRegister(); DataRow dr = dtblVoucherTypeName.NewRow(); dr[1] = "All"; dtblVoucherTypeName.Rows.InsertAt(dr, 0); cmbVoucherType.DataSource = dtblVoucherTypeName; cmbVoucherType.ValueMember = "voucherTypeId"; cmbVoucherType.DisplayMember = "voucherTypeName"; } catch (Exception ex) { MessageBox.Show("AR2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }