private void OpenRecord() { dtHeadSeq = objPayrollMgr.SelectPaySlipSalHeadSeq(0, 0); grHeadSeq.DataSource = dtHeadSeq; grHeadSeq.DataBind(); foreach (GridViewRow gRow in grHeadSeq.Rows) { gRow.Cells[1].Text = Convert.ToString(Math.Round(Convert.ToDouble(gRow.Cells[1].Text), 0)); switch (gRow.Cells[3].Text.Trim()) { case "S": gRow.Cells[3].Text = "Salary"; gRow.Cells[3].BackColor = System.Drawing.Color.FromArgb(204, 204, 204); break; case "B": gRow.Cells[3].Text = "Benefit"; gRow.Cells[3].BackColor = System.Drawing.Color.FromArgb(153, 255, 102); break; case "D": gRow.Cells[3].Text = "Deduction"; gRow.Cells[3].BackColor = System.Drawing.Color.FromArgb(255, 153, 051); break; } } dtSalaryHead = objPayrollMgr.SelectSalaryHead(0, ""); this.Bind_DdlSalaryHead(); }
private void OpenRecord() { dtSalaryHead = objPayrollMgr.SelectSalaryHead(0, "N"); grSalaryHead.DataSource = dtSalaryHead; grSalaryHead.DataBind(); foreach (GridViewRow gRow in grSalaryHead.Rows) { if (gRow.Cells[3].Text == "1") { gRow.Cells[3].Text = "Additive"; } else { gRow.Cells[3].Text = "Deductive"; } if (Common.CheckNullString(gRow.Cells[6].Text) != "") { if (gRow.Cells[6].Text == "S") { gRow.Cells[6].Text = "Salary"; } else { gRow.Cells[6].Text = "Variable"; } } else { gRow.Cells[6].Text = ""; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { hfIsUpdate.Value = "N"; this.EntryMode(false); Common.FillDropDownList(objSalaryHead.SelectSalaryHead(0, "Y"), ddlSalHead, true); } }
private void OpenRecord() { dtSalaryHead = objPayrollMgr.SelectSalaryHead(0, ""); dtGrossSalHead = objPayrollMgr.SelectGrossSalHead(0); dtTotalSalHead = objPayrollMgr.SelectTotalSalHeadWithSeq(0); grTotalSalary.DataSource = dtSalaryHead; grTotalSalary.DataBind(); DataRow[] foundRows; DataRow[] foundGrRows; DataRow[] foundRptRows; string strExpr = ""; string strExprGross = ""; for (int i = 0; i < grTotalSalary.Rows.Count; i++) { strExpr = "SHEADID=" + grTotalSalary.DataKeys[i].Values[0].ToString().Trim(); strExprGross = "SHEADID=" + grTotalSalary.DataKeys[i].Values[0].ToString().Trim(); foundRows = dtTotalSalHead.Select(strExpr); foundGrRows = dtGrossSalHead.Select(strExprGross); HiddenField hfDT = (HiddenField)grTotalSalary.Rows[i].FindControl("hfDispType"); if (foundRows.Length > 0) { CheckBox chBox = (CheckBox)grTotalSalary.Rows[i].FindControl("chkBox"); chBox.Checked = true; TextBox txtSN = (TextBox)grTotalSalary.Rows[i].FindControl("txtSeqNo"); txtSN.Text = foundRows[0]["SEQNO"].ToString().Trim(); } if (foundGrRows.Length > 0) { hfDT.Value = "S"; grTotalSalary.Rows[i].Cells[2].Text = "Salary"; } else { if (grTotalSalary.DataKeys[i].Values[1].ToString().Trim() == "1") { hfDT.Value = "B"; grTotalSalary.Rows[i].Cells[2].Text = "Benefit"; } else if (grTotalSalary.DataKeys[i].Values[1].ToString().Trim() == "-1") { hfDT.Value = "D"; grTotalSalary.Rows[i].Cells[2].Text = "Deduction"; } } foundGrRows = null; foundRows = null; } }
private void OpenRecord() { dtSalaryHead = objPayrollMgr.SelectSalaryHead(0, "N"); dtBonus = objPayrollMgr.SelectBonusPackage(0); grBonus.DataSource = dtBonus; grBonus.DataBind(); foreach (GridViewRow gRow in grBonus.Rows) { gRow.Cells[3].Text = Convert.ToString(Math.Round(Convert.ToDouble(Common.ReturnZeroForNull(gRow.Cells[3].Text)), 2)); gRow.Cells[6].Text = Convert.ToString(Math.Round(Convert.ToDouble(Common.ReturnZeroForNull(gRow.Cells[6].Text)), 2)); } dtSalaryHead = objPayrollMgr.SelectSalaryHead(0, "N"); this.Bind_DdlSalaryHead(); dtCurr = objPayrollMgr.SelectCurrencyList(0); this.Bind_DdlCurrency(); }
private void OpenRecord() { dtLoanType = objPayrollMgr.SelectLoanType(0); grLoanType.DataSource = dtLoanType; grLoanType.DataBind(); foreach (GridViewRow gRow in grLoanType.Rows) { //gRow.Cells[3].Text = Convert.ToString(Math.Round(Convert.ToDouble(Common.ReturnZeroForNull(gRow.Cells[3].Text)), 2)); } dtSalHead = objPayrollMgr.SelectSalaryHead(0, ""); this.Bind_DdlSalaryHead(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { hfIsUpdate.Value = "N"; this.EntryMode(false); Common.FillIdNameDropDownList2(objSalaryHeadMgr.SelectSalaryHead(0, "N"), ddlOTSalHead, "HEADNAME", "SHEADID", false); Common.FillIdNameDropDownList2(objSalaryPakDets.SelectSalaryHead(0, "N"), ddlAttnSalHead, "HEADNAME", "SHEADID", false); Common.FillDropDownList(objSalaryHeadMgr.SelectSalaryHeadDeduction(0, ""), ddlDeductHead, true); Common.FillDropDownList(objSalaryPakDets.GenerateSalaryPackTitle(), ddlSalPackTitle, "SalPackTitle", "EMPID", true, "Select"); this.FillPackageInfo(); Panel1.Visible = false; TabContainer1.ActiveTabIndex = 0; chkShowAll.Checked = true; } }
private void OpenRecord() { dtOtherHead = objPayrollMgr.SelectSalaryHead(0, "Y"); grOtherHead.DataSource = dtOtherHead; grOtherHead.DataBind(); foreach (GridViewRow gRow in grOtherHead.Rows) { if (gRow.Cells[2].Text == "1") { gRow.Cells[2].Text = "Additive"; } else { gRow.Cells[2].Text = "Deductive"; } gRow.Cells[3].Text = Convert.ToString(Math.Round(Convert.ToDouble(Common.ReturnZeroForNull(gRow.Cells[3].Text)), 2)); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Payroll_PaySlipOptionMgr objOptMgr = new Payroll_PaySlipOptionMgr(); objOptMgr.GetPaySlipOptionsValue(); Common.FillDropDownList(objSalaryHeadMgr.SelectSalaryHead(0, "N"), ddlBenefitHead, "HEADNAME", "SHEADID", true, "Select"); Common.FillDropDownList(objMasMgr.SelectEmpType(0, "Y"), ddlEmpType, "TYPENAME", "EMPTYPEID", true, "Select"); Common.FillDropDownListWithGross(objSalaryHeadMgr.SelectGrossSalHeadWithName(0), ddlPercentHead, "HEADNAME", "SHEADID", true); Common.FillDropDownList(objSalaryHeadMgr.SelectFiscalYear(0), ddlFiscalYear, "FISCALYRTITLE", "FISCALYRID", false); this.OpenRecord(); hfMPCIsUpdate.Value = "N"; this.FillMPCDayDropDownList(31); this.OpenMonthlyPayrollCycleData(); this.OpenBenefitsPolicyRecord(); hfBPID.Value = ""; } }
private void OpenRecord() { dtSalaryHead = objPayrollMgr.SelectSalaryHead(0, "N"); dtGrossSalHead = objPayrollMgr.SelectGrossSalHead(0); grGrossSalary.DataSource = dtSalaryHead; grGrossSalary.DataBind(); DataRow[] foundRows; string strExpr = ""; for (int i = 0; i < grGrossSalary.Rows.Count; i++) { strExpr = "SHEADID=" + grGrossSalary.DataKeys[i].Values[0].ToString().Trim(); foundRows = dtGrossSalHead.Select(strExpr); if (foundRows.Length > 0) { CheckBox chBox = (CheckBox)grGrossSalary.Rows[i].FindControl("chkBox"); chBox.Checked = true; } } }
private void OpenRecord() { DataTable dtSalaryHead = objPayrollMgr.SelectSalaryHead(0, ""); DataTable dtGrossSalHead = objPayrollMgr.SelectGrossSalHead(0); DataTable dtTotalSalHead = objPayrollMgr.SelectTotalSalHeadWithSeq(0); DataTable dtReportSalHead = objPayRptMgr.SelectSalHeadWithSeqForReport(1); DataRow nRow = dtSalaryHead.NewRow(); nRow["SHEADID"] = "99999"; nRow["HEADNAME"] = "Gross Salary"; nRow["HEADNATURE"] = "2"; nRow["DEFALTAMNT"] = "0.00"; dtSalaryHead.Rows.Add(nRow); dtSalaryHead.AcceptChanges(); grSalItem.DataSource = dtSalaryHead; grSalItem.DataBind(); DataRow[] foundRows; DataRow[] foundGrRows; DataRow[] foundRptRows; string strExpr = ""; string strExprGross = ""; for (int i = 0; i < grSalItem.Rows.Count; i++) { strExpr = "SHEADID=" + grSalItem.DataKeys[i].Values[0].ToString().Trim(); strExprGross = "SHEADID=" + grSalItem.DataKeys[i].Values[0].ToString().Trim(); foundRows = dtTotalSalHead.Select(strExpr); foundGrRows = dtGrossSalHead.Select(strExprGross); foundRptRows = dtReportSalHead.Select(strExpr); if (grSalItem.DataKeys[i].Values[0].ToString().Trim() == "99999") { if (foundRptRows.Length > 0) { CheckBox chBox1 = (CheckBox)grSalItem.Rows[i].FindControl("chkBox"); chBox1.Checked = true; TextBox txtSN1 = (TextBox)grSalItem.Rows[i].FindControl("txtSeqNo"); txtSN1.Text = foundRptRows[0]["SEQNO"].ToString().Trim(); } continue; } HiddenField hfDT = (HiddenField)grSalItem.Rows[i].FindControl("hfDispType"); if (foundRptRows.Length > 0) { CheckBox chBox = (CheckBox)grSalItem.Rows[i].FindControl("chkBox"); chBox.Checked = true; TextBox txtSN = (TextBox)grSalItem.Rows[i].FindControl("txtSeqNo"); txtSN.Text = foundRptRows[0]["SEQNO"].ToString().Trim(); } if (foundRows.Length == 0) { if (foundGrRows.Length == 0) { grSalItem.Rows[i].Visible = false; foundGrRows = null; foundRows = null; continue; } } if (foundGrRows.Length > 0) { hfDT.Value = "S"; grSalItem.Rows[i].Cells[2].Text = "Salary"; } else { if (grSalItem.DataKeys[i].Values[1].ToString().Trim() == "1") { hfDT.Value = "B"; grSalItem.Rows[i].Cells[2].Text = "Benefit"; } else if (grSalItem.DataKeys[i].Values[1].ToString().Trim() == "-1") { hfDT.Value = "D"; grSalItem.Rows[i].Cells[2].Text = "Deduction"; } } foundGrRows = null; foundRows = null; } }