/// <summary> /// Function to get values for search based on parameters /// </summary> /// <param name="strName"></param> /// <param name="dtMonth"></param> /// <returns></returns> public List <DataTable> BonusDeductionSearch(String strName, DateTime dtMonth) { List <DataTable> listObj = new List <DataTable>(); try { listObj = SPBonusDedution.BonusDeductionSearch(strName, dtMonth); } catch (Exception ex) { MessageBox.Show("BDBll7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(listObj); }
/// <summary> /// Function to fill Datagridview /// </summary> public void GridFill() { try { DataTable dtblBonusDeduction = new DataTable(); BonusDedutionSP spBonusDeduction = new BonusDedutionSP(); dtblBonusDeduction = spBonusDeduction.BonusDeductionSearch(cmbEmployeeName.Text, Convert.ToDateTime(dtpMonth.Text.ToString())); dgvBonusDeduction.DataSource = dtblBonusDeduction; } catch (Exception ex) { MessageBox.Show("BDR3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public ActionResult GetBonusDeductionRegister(string employeeName, string month) { string jsonComboData = string.Empty; string jsonTableData = string.Empty; try { DataTable dtblBonusDeduction = new DataTable(); BonusDedutionSP spBonusDeduction = new BonusDedutionSP(); dtblBonusDeduction = spBonusDeduction.BonusDeductionSearch(employeeName, Convert.ToDateTime(month)); jsonTableData = Utils.ConvertDataTabletoString(dtblBonusDeduction); DataTable employeeNameCombo = EmployeeNameComboFill(); jsonComboData = Utils.ConvertDataTabletoString(employeeNameCombo); } catch (Exception ex) { return(Json(new { success = "true", ex = "BDR1:" + ex.Message })); } return(Json(new { success = "true", ex = "no", tableData = jsonTableData, comboData = jsonComboData })); }