public List <DataTable> SalaryPackageViewAllForMonthlySalarySettings() { List <DataTable> ListObj = new List <DataTable>(); try { ListObj = SalaryPackage.SalaryPackageViewAllForMonthlySalarySettings(); } catch (Exception ex) { MessageBox.Show("AL2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(ListObj); }
/// <summary> /// Function to fill Package combobox in Datagridview /// </summary> public void SalaryPackageComboFill() { try { DataTable dtblSalaryPackage = new DataTable(); SalaryPackageSP spSalaryPackage = new SalaryPackageSP(); dtblSalaryPackage = spSalaryPackage.SalaryPackageViewAllForMonthlySalarySettings(); DataRow dr = dtblSalaryPackage.NewRow(); dr[0] = "0"; dr[1] = "--Select--"; dtblSalaryPackage.Rows.InsertAt(dr, 0); dgvcmbPackage.DataSource = dtblSalaryPackage; dgvcmbPackage.ValueMember = "salaryPackageId"; dgvcmbPackage.DisplayMember = "salaryPackageName"; } catch (Exception ex) { MessageBox.Show("MSS2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public ActionResult GetMonthlySalarySettingsDetails(string month) { DataTable dtMonthly = GetMonthlySalarySettingsFromDB(month); DataTable dtblSalaryPackage = new DataTable(); SalaryPackageSP spSalaryPackage = new SalaryPackageSP(); dtblSalaryPackage = spSalaryPackage.SalaryPackageViewAllForMonthlySalarySettings(); string jsonTableData = Utils.ConvertDataTabletoString(dtMonthly); string jsonComboData = Utils.ConvertDataTabletoString(dtblSalaryPackage); string jsonBtnStatus = string.Empty; MonthlySalarySP spMonthlySalary = new MonthlySalarySP(); if (spMonthlySalary.MonthlySalarySettingsMonthlySalaryIdSearchUsingSalaryMonth(Convert.ToDateTime(month)) > 0) { jsonBtnStatus = "Update"; } else { jsonBtnStatus = "Save"; } return(Json(new { success = "true", tableData = jsonTableData, comboData = jsonComboData, btnStatus = jsonBtnStatus })); }