Beispiel #1
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         DataTable        dtblAdvancePayment = new DataTable();
         AdvancePaymentSP spAdvanceRegister  = new AdvancePaymentSP();
         dtblAdvancePayment            = spAdvanceRegister.AdvanceRegisterSearch(txtAdvanceVoucher.Text, txtEmployeeCode.Text, txtEmployeeName.Text, dtpSalaryMonth.Text, cmbVoucherType.Text);
         dgvAdvanceRegister.DataSource = dtblAdvancePayment;
     }
     catch (Exception ex)
     {
         MessageBox.Show("AR1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #2
0
        public List <DataTable> AdvanceRegisterSearch(string strAdvanceVoucher, string strEmployeeCode, string strEmployeeName, string dtpDate, string strVouchertypeName)
        {
            //EmployeeInfo infoEmployee = new EmployeeInfo();
            List <DataTable> ListObj = new List <DataTable>();

            try
            {
                ListObj = spAdvancePayment.AdvanceRegisterSearch(strAdvanceVoucher, strEmployeeCode, strEmployeeName, dtpDate, strVouchertypeName);
            }
            catch (Exception ex)
            {
                MessageBox.Show("AP10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(ListObj);
        }
Beispiel #3
0
        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 }));
        }