Exemplo n.º 1
0
        public ActionResult GetDailySalarySearch(string voucherDateFrom, string voucherDateTo, string salaryDateFrom, string salaryDateTo, string voucherNo)
        {
            bool   isSuccess   = true;
            string message     = "success";
            string jsonResults = "";

            try
            {
                voucherNo = voucherNo ?? string.Empty;
                DataTable dtblDailySalaryRegister = new DataTable();
                DailySalaryVoucherMasterSP spDailySalaryVoucherMasterSP = new DailySalaryVoucherMasterSP();
                dtblDailySalaryRegister = spDailySalaryVoucherMasterSP.DailySalaryRegisterSearch(Convert.ToDateTime(voucherDateFrom), Convert.ToDateTime(voucherDateTo),
                                                                                                 Convert.ToDateTime(salaryDateFrom), Convert.ToDateTime(salaryDateTo), voucherNo);
                jsonResults = Utils.ConvertDataTabletoString(dtblDailySalaryRegister);
            }
            catch (Exception ex)
            {
                isSuccess = false;
                message   = ex.Message;
            }

            return(Json(new
            {
                isSuccess,
                message,
                data = jsonResults
            }));
        }
 public List <DataTable> DailySalaryRegisterSearch(DateTime dtVoucherDateFrom, DateTime dtVoucherDateTo, DateTime dtSalaryDateFrom, DateTime dtSalaryDateTo, string strInvoiceNo)
 {
     try
     {
         return(SpMaster.DailySalaryRegisterSearch(dtVoucherDateFrom, dtVoucherDateTo, dtSalaryDateFrom, dtSalaryDateTo, strInvoiceNo));
     }
     catch (Exception)
     {
         throw;
     }
 }
        public List <DataTable> DailySalaryRegisterSearch(DateTime dtVoucherDateFrom, DateTime dtVoucherDateTo, DateTime dtSalaryDateFrom, DateTime dtSalaryDateTo, string strInvoiceNo)
        {
            List <DataTable> listObj = new List <DataTable>();

            try
            {
                listObj = SpDailySalaryVoucherMaster.DailySalaryRegisterSearch(dtVoucherDateFrom, dtVoucherDateTo, dtSalaryDateFrom, dtSalaryDateTo, strInvoiceNo);
            }
            catch (Exception ex)
            {
                MessageBox.Show("DSV7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(listObj);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         DataTable dtblDailySalaryRegister = new DataTable();
         DailySalaryVoucherMasterSP spDailySalaryVoucherMasterSP = new DailySalaryVoucherMasterSP();
         dtblDailySalaryRegister           = spDailySalaryVoucherMasterSP.DailySalaryRegisterSearch(Convert.ToDateTime(txtVoucherDateFrom.Text.ToString()), Convert.ToDateTime(txtVoucherDateTo.Text.ToString()), Convert.ToDateTime(txtSalaryDateFrom.Text.ToString()), Convert.ToDateTime(txtSalaryDateTo.Text.ToString()), txtVoucherNo.Text);
         dgvDailySalaryRegister.DataSource = dtblDailySalaryRegister;
     }
     catch (Exception ex)
     {
         MessageBox.Show("DSR2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }