protected void grPackageList_RowCommand(object sender, GridViewCommandEventArgs e) { GridView _gridView = (GridView)sender; // Get the selected index and the command name int _selectedIndex = int.Parse(e.CommandArgument.ToString()); string _commandName = e.CommandName; _gridView.SelectedIndex = _selectedIndex; switch (_commandName) { case ("RowEdit"): Payroll_MasterMgr objSalaryManager2 = new Payroll_MasterMgr(); dtSalaryPackage = objSalaryManager2.SelectSalaryPackage(Convert.ToInt32(grPackageList.DataKeys[_gridView.SelectedIndex].Values[0].ToString().Trim())); if (dtSalaryPackage.Rows.Count > 0) { hfIsUpdate.Value = "Y"; hfID.Value = grPackageList.DataKeys[_gridView.SelectedIndex].Values[0].ToString().Trim(); ddlSalPackTitle.SelectedValue = dtSalaryPackage.Rows[0]["EmpId"].ToString().Trim(); //txtHeadTitle.Text = dtSalaryPackage.Rows[0]["SPTitle"].ToString().Trim(); txtDescription.Text = dtSalaryPackage.Rows[0]["SPDesc"].ToString().Trim(); txtNetPayableAmt.Text = dtSalaryPackage.Rows[0]["totalSalary"].ToString().Trim(); txtGrossSal.Text = dtSalaryPackage.Rows[0]["TotalGrossSal"].ToString().Trim(); txtNetAmountIn.Text = "0"; // Display the Details Value DataTable dtSalHeadDetails = objSalaryPakDets.SelectSalaryPakDetls(Convert.ToInt32(hfID.Value)); grSalHead.DataSource = dtSalHeadDetails; grSalHead.DataBind(); this.EntryMode(true); } TabContainer1.ActiveTabIndex = 0; break; } }
private void FillPackageInfo() { grPackageList.DataSource = null; grPackageList.DataBind(); dtSalaryPackage = objSalaryManager.SelectSalaryPackage(0); if (dtSalaryPackage.Rows.Count > 0) { grPackageList.DataSource = dtSalaryPackage; grPackageList.DataBind(); this.FormatSalaryPackageGrid(); lblPkgCount.Text = "Total Records : " + dtSalaryPackage.Rows.Count.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Common.FillDropDownList_Nil(objMasMgr.SelectDivision(0), ddlCompany); Common.FillDropDownList_Nil(objMasMgr.SelectProject(), ddlProject); Common.FillDropDownList_Nil(objMasMgr.SelectProjectOffice(0), ddlProjectOffice); Common.FillDropDownList_Nil(objMasMgr.SelectClinic("Y"), ddlClinic); Common.FillDropDownList_Nil(objMasMgr.SelectDepartment(0), ddlDept); Common.FillDropDownList_Nil(objMasMgr.SelectDeptWsSubDept(Convert.ToInt32(ddlDept.SelectedValue)), ddlSubDept); Common.FillDropDownList_Nil(objMasMgr.SelectGrade(0), ddlGrade); Common.FillDropDownList_Nil(objMasMgr.SelectGradeWsDesignation(Convert.ToInt32(ddlGrade.SelectedValue)), ddlDesignation); Common.FillDropDownList_Nil(objMasMgr.SelectSalaryLocation(0), ddlSalaryLoc); Common.FillDropDownList_Nil(objMasMgr.SelectLocationCategory(0), ddlLocCategory); Common.FillDropDownList_Nil(objMasMgr.SelectLeavePakMst(0), ddlLeavePackage); Common.FillDropDownList_Nil(objMasMgr.SelectWeekendPolicy(0), ddlWeekend); Common.FillDropDownList_Nil(objMasMgr.SelectAttendancePolicy(0), ddlAttndPolicy); Common.FillDropDownList_Nil(objMasMgr.SelectAction(0, "S"), ddlSepType); Common.FillDropDownList_Nil(objSalaryManager.SelectSalaryPackage(0), ddlSalaryPak); Common.FillDropDownList_Nil(objPayOptMgr.GetMonthlyPayrollCycleData(), ddlMPC); Common.FillDropDownList(objEmpInfoMgr.SelectSupervisor(), ddlSupervisor, "EMPNAME", "EMPID", true, "Nil"); Common.FillDropDownList_Nil(objMasMgr.SelectRegion(), ddlRegion); Common.FillDropDownList(objEmpInfoMgr.SelectBankList(), ddlBankName, "BankName", "BankCode", true, "Nil"); //this.GetTaskPermissionContract(); DataTable dtTaskPermission = objUserMgr.GetUserTaskPermission(Session["USERID"].ToString(), "302", "T102"); Common.FillDropDownList_Nil(objMasMgr.SelectEmpType(0, "Y"), ddlEmpType); Common.FillDropDownValue(objMasMgr.SelectTaxRegion(0), ddlTaxRegion); if (string.IsNullOrEmpty(Session["HREMPID"].ToString()) == false) { txtEmpID.Text = Session["HREMPID"].ToString().Trim(); this.FillEmpInfo(Session["HREMPID"].ToString().Trim()); } } this.GetViewPermission(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable allowedInterventions = objViewPerm.ExistSelection(objMasMgr.SelectDivision(0), ViewPermission.SelectionList.Intervention, 302); DataTable allowedProjects = objViewPerm.ExistSelection(objMasMgr.SelectProject(0), ViewPermission.SelectionList.ProjectId, 302); DataTable allowedSectors = objViewPerm.ExistSelection(objMasMgr.SelectSector(0), ViewPermission.SelectionList.SectorId, 302); DataTable allowedGrades = objViewPerm.ExistSelection(objMasMgr.SelectGrade(0), ViewPermission.SelectionList.GradeId, 302); //DataTable allowedInterventions = objViewPerm.ExistSelection(objMasMgr.SelectDivision(0), ViewPermission.SelectionList.Intervention, 302); //DataTable allowedInterventions = objViewPerm.ExistSelection(objMasMgr.SelectDivision(0), ViewPermission.SelectionList.Intervention, 302); if (allowedInterventions != null) { Common.FillDropDownList_Nil(allowedInterventions, ddlCompany); } if (allowedProjects != null) { Common.FillDropDownList_Nil(allowedProjects, ddlProject); } Common.FillDropDownList_Nil(objMasMgr.SelectOfficeTypeList(0), ddlOffType); if (allowedSectors != null) { Common.FillDropDownList_Nil(allowedSectors, ddlSector); } Common.FillDropDownList_Nil(objMasMgr.SelectDepartment(0), ddlDept); Common.FillDropDownList_Nil(objMasMgr.SelectUnit(0), ddlUnit); ddlComponent.DataSource = objCmp.getComponents().Where(cc => cc.IsActive == "Y" && cc.IsDeleted == "N").ToList(); ddlComponent.DataTextField = "ComponentName"; ddlComponent.DataValueField = "ComponentId"; ddlComponent.DataBind(); Common.FillDropDownList_Nil(objMasMgr.SelectPoistingDivision(0), ddlPostDivision); Common.FillDropDownList_Nil(objMasMgr.SelectDivisionWiseDistrict2(Convert.ToInt32(ddlPostDivision.SelectedValue)), ddlPostDistrict); Common.FillDropDownList_Nil(objMasMgr.SelectLocation(0), ddlPostingPlace); Common.FillDropDownList_Nil(objMasMgr.SelectDesignation(0), ddlDesignation); Common.FillDropDownList_Nil(objMasMgr.SelectJobTitle(0), ddlJobTitle); Common.FillDropDownList_Nil(objMasMgr.SelectPositionByFunction(0), ddlPosByFunction); if (allowedGrades != null) { Common.FillDropDownList_Nil(allowedGrades, ddlGrade); } Common.FillDropDownList_Nil(objMasMgr.SelectGradeLevel(0), ddlGradeLevel); Common.FillDropDownList_Nil(objMasMgr.SelectSalaryLocation(0), ddlSalaryLoc); //Common.FillDropDownList_Nil(objMasMgr.SelectSalarySubLocation(0), ddlSalarySubLoc); Common.FillDropDownList_Nil(objMasMgr.SelectLeavePakMst(0), ddlLeavePackage); Common.FillDropDownList_Nil(objMasMgr.SelectWeekendPolicy(0), ddlWeekend); Common.FillDropDownList_Nil(objMasMgr.SelectAttendancePolicy(0), ddlAttndPolicy); Common.FillDropDownList_Nil(objMasMgr.SelectAction(0, "S"), ddlSepType); Common.FillDropDownList_Nil(objSalaryManager.SelectSalaryPackage(0), ddlSalaryPak); Common.FillDropDownList_Nil(objPayOptMgr.GetMonthlyPayrollCycleData(), ddlMPC); //Common.FillDropDownList(objEmpInfoMgr.SelectSupervisor(), ddlSupervisor, "EMPNAME", "EMPID", true, "Nil"); Common.FillDropDownList(objEmpInfoMgr.SelectBankList(), ddlBankName, "BankName", "BankCode", true, "Nil"); this.GetTaskPermissionContract(); Common.FillDropDownList_Nil(objMasMgr.SelectEmpType(0).Select("IsActive='Y'").CopyToDataTable(), ddlEmpType); Common.FillDropDownList_Nil(objMasMgr.SelectEmpNature(0), ddlEmpNature); //if (string.IsNullOrEmpty(Session["HREMPID"].ToString()) == false) //{ // txtEmpID.Text = Session["HREMPID"].ToString().Trim(); // this.FillEmpInfo(Session["HREMPID"].ToString().Trim()); //} } }