protected void BtnUpdate_Click(object sender, EventArgs e) { try { hdnCashCode.Value = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_GLCASHCODE)); int GLCode = Converter.GetInteger(hdnCashCode.Value); Int16 RecType = Converter.GetSmallInteger(2); A2ZRECCTRLNODTO getDTO = (A2ZRECCTRLNODTO.GetLastVoucherNo(GLCode, RecType)); CtrlVchNo.Text = "G" + GLCode + "-" + getDTO.RecLastNo; TrnLimitValidity(); var prm = new object[3]; prm[0] = hdnID.Value; prm[1] = CtrlVchNo.Text; prm[2] = CtrlProcStat.Text; int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_GlUpdateTransaction", prm, "A2ZGLMCUS")); if (result == 0) { UnPostValue(); gvDebit(); clearInfo(); if (CtrlTrnType.Text == "1") { txtVchNo.Focus(); } else { lblContra.Text = "Debit Code :"; lblAccount.Text = "Credit Code :"; txtVchNo.Focus(); } UpdatedMSG(); BtnUpdate.Visible = false; txtContra.ReadOnly = false; txtTrnsactionCode.ReadOnly = false; txtVchDate.Text = CtrlProcDate.Text; //string strQuery1 = "DELETE FROM WFGLTrannsaction" WHERE UserID='" + hdnID.Value + "'"; string strQuery1 = @"DELETE dbo.WFGLTrannsaction WHERE UserID='" + hdnID.Value + "'"; int status1 = Converter.GetSmallInteger(DataAccessLayer.BLL.CommonManager.Instance.ExecuteNonQuery(strQuery1, "A2ZGLMCUS")); } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnUpdate_Click Problem');</script>"); //throw ex; } }
protected void BtnPost_Click(object sender, EventArgs e) { try { if (txtAccNo.Text == string.Empty) { txtAccNo.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Account No.');", true); return; } //A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue(); //int GLCode = Converter.GetInteger(dto.CashCode); int GLCode = Converter.GetInteger(hdnCashCode.Text); Int16 RecType = Converter.GetSmallInteger(1); A2ZRECCTRLNODTO getDTO = (A2ZRECCTRLNODTO.GetLastVoucherNo(GLCode, RecType)); CtrlVchNo.Text = "C" + GLCode + "-" + getDTO.RecLastNo; var prm = new object[4]; prm[0] = CtrlVchNo.Text; prm[1] = hdnCashCode.Text; prm[2] = CtrlAccType.Text; prm[3] = Converter.GetLong(txtAccNo.Text); //if (ddlAccType.SelectedValue == "15") //{ int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_CSUpdateManualRenewalFDR", prm, "A2ZCSMCUS")); if (result == 0) { BtnCalculate.Visible = false; //lblVchNo.Visible = false; //txtVchNo.Visible = false; BtnPost.Visible = false; BtnReverse.Visible = true; BtnExit.Visible = true; UpdateBackUpStat(); UpdateMSG(); } //} } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnPost_Click Problem');</script>"); //throw ex; } }
protected void BtnUpdate_Click(object sender, EventArgs e) { hdnCashCode.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_GLCASHCODE)); int GLCode = Converter.GetInteger(hdnCashCode.Text); Int16 RecType = Converter.GetSmallInteger(2); A2ZRECCTRLNODTO getDTO = (A2ZRECCTRLNODTO.GetLastVoucherNo(GLCode, RecType)); CtrlVchNo.Text = "G" + GLCode + "-" + getDTO.RecLastNo; TrnLimitValidity(); var prm = new object[3]; prm[0] = hdnID.Value; prm[1] = CtrlVchNo.Text; prm[2] = CtrlProcStat.Text; int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_GlUpdateTransaction", prm, "A2ZGLMCUS")); if (result == 0) { SumValue(); gvDebit(); clearInfo(); if (CtrlTrnType.Text == "1") { txtTrnsactionCode.Focus(); } else { DisableInfo(); ddlTrnMode.Focus(); } UpdatedMSG(); BtnUpdate.Visible = false; txtVchDate.Text = CtrlProcDate.Text; //string strQuery1 = "DELETE FROM WFGLTrannsaction" WHERE UserID='" + hdnID.Value + "'"; string strQuery1 = @"DELETE dbo.WFGLTrannsaction WHERE UserID='" + hdnID.Value + "'"; int status1 = Converter.GetSmallInteger(DataAccessLayer.BLL.CommonManager.Instance.ExecuteNonQuery(strQuery1, "A2ZGLMCUS")); } }
protected void BtnPost_Click(object sender, EventArgs e) { try { if (txtVchNo.Text == string.Empty) { txtVchNo.Focus(); //String csname1 = "PopupScript"; //Type cstype = GetType(); //ClientScriptManager cs = Page.ClientScript; //if (!cs.IsStartupScriptRegistered(cstype, csname1)) //{ // String cstext1 = "alert('Please Input Vch.No.' );"; // cs.RegisterStartupScript(cstype, csname1, cstext1, true); //} ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Vch.No.');", true); return; } TrnVchDeplicate(); if (hdnMsgFlag.Text == "1") { return; } //A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue(); //int GLCode = Converter.GetInteger(dto.CashCode); int GLCode = Converter.GetInteger(hdnCashCode.Text); Int16 RecType = Converter.GetSmallInteger(1); A2ZRECCTRLNODTO getDTO = (A2ZRECCTRLNODTO.GetLastVoucherNo(GLCode, RecType)); CtrlVchNo.Text = "C" + GLCode + "-" + getDTO.RecLastNo; var prm = new object[3]; prm[0] = CtrlVchNo.Text; prm[1] = txtVchNo.Text.Trim(); prm[2] = hdnCashCode.Text; if (ddlAccType.SelectedValue == "15") { int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_CSUpdateRenewalFDR", prm, "A2ZCSMCUS")); if (result == 0) { BtnCalculate.Visible = false; lblVchNo.Visible = false; txtVchNo.Visible = false; BtnPost.Visible = false; BtnPrint.Visible = true; BtnReverse.Visible = true; BtnExit.Visible = true; UpdateBackUpStat(); UpdateMSG(); } } if (ddlAccType.SelectedValue == "16") { int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_CSUpdateRenewal6YR", prm, "A2ZCSMCUS")); if (result == 0) { BtnCalculate.Visible = false; lblVchNo.Visible = false; txtVchNo.Visible = false; BtnPost.Visible = false; BtnPrint.Visible = true; BtnReverse.Visible = true; BtnExit.Visible = true; UpdateBackUpStat(); UpdateMSG(); } } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnPost_Click Problem');</script>"); //throw ex; } }
protected void BtnPost_Click(object sender, EventArgs e) { try { if (txtVchNo.Text == string.Empty) { txtVchNo.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Vch.No.');", true); return; } TrnVchDeplicate(); if (hdnMsgFlag.Text == "1") { return; } //A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue(); //int GLCode = Converter.GetInteger(dto.CashCode); int GLCode = Converter.GetInteger(hdnCashCode.Text); Int16 RecType = Converter.GetSmallInteger(1); A2ZRECCTRLNODTO getDTO = (A2ZRECCTRLNODTO.GetLastVoucherNo(GLCode, RecType)); CtrlVchNo.Text = "C" + GLCode + "-" + getDTO.RecLastNo; if (lblCurrMth.Text == "12") { txtToDaysDate.Text = "July" + "-" + "December" + " " + lblBegYear.Text; } else if (lblCurrMth.Text == "6") { txtToDaysDate.Text = "January" + "-" + "June" + " " + lblEndYear.Text; } var prm = new object[6]; prm[0] = ddlAccType.SelectedValue; prm[1] = CtrlVchNo.Text; prm[2] = txtVchNo.Text.Trim(); prm[3] = hdnCashCode.Text; prm[4] = txtDesc.Text; prm[5] = hdnID.Text; int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_CSUpdateDividendAmount", prm, "A2ZCSMCUS")); if (result == 0) { BtnCalculate.Visible = false; lblVchNo.Visible = false; txtVchNo.Visible = false; BtnPost.Visible = false; BtnPrint.Visible = true; BtnReverse.Visible = true; BtnExit.Visible = true; UpdateBackUpStat(); UpdateMSG(); } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnPost_Click Problem');</script>"); //throw ex; } }
protected void BtnTransfer_Click(object sender, EventArgs e) { try { TrnVchDeplicate(); if (txtVchNo.Text == string.Empty) { txtVchNo.Focus(); //String csname1 = "PopupScript"; //Type cstype = GetType(); //ClientScriptManager cs = Page.ClientScript; //if (!cs.IsStartupScriptRegistered(cstype, csname1)) //{ // String cstext1 = "alert('Please Input Vch.No.' );"; // cs.RegisterStartupScript(cstype, csname1, cstext1, true); //} ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Vch.No.');", true); return; } if (txtTrnAmount.Text == string.Empty) { txtTrnAmount.Focus(); //String csname1 = "PopupScript"; //Type cstype = GetType(); //ClientScriptManager cs = Page.ClientScript; //if (!cs.IsStartupScriptRegistered(cstype, csname1)) //{ // String cstext1 = "alert('Please Input Transaction Amount' );"; // cs.RegisterStartupScript(cstype, csname1, cstext1, true); //} ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Transaction Amount');", true); return; } if (txtDescription.Text == string.Empty) { txtDescription.Focus(); //String csname1 = "PopupScript"; //Type cstype = GetType(); //ClientScriptManager cs = Page.ClientScript; //if (!cs.IsStartupScriptRegistered(cstype, csname1)) //{ // String cstext1 = "alert('Please Input Transaction Description');"; // cs.RegisterStartupScript(cstype, csname1, cstext1, true); //} ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Transaction Description');", true); return; } //BalanceChaeck(); //if (ValidityFlag.Text == "1") //{ // txtTrnAmount.Text = string.Empty; // txtTrnAmount.Focus(); // AccessAmountMSG(); // return; //} int GLCode = Converter.GetInteger(hdnCashCode.Text); Int16 RecType = Converter.GetSmallInteger(1); A2ZRECCTRLNODTO getDTO = (A2ZRECCTRLNODTO.GetLastVoucherNo(GLCode, RecType)); CtrlVoucherNo.Text = "C" + hdnCashCode.Text + "-" + getDTO.RecLastNo; TrnLimitValidity(); DateTime opdate = DateTime.ParseExact(txtTranDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); var prm = new object[19]; prm[0] = hdnUserId.Text; prm[1] = CtrlVoucherNo.Text; prm[2] = CtrlProcStat.Text; prm[3] = opdate; prm[4] = txtVchNo.Text; prm[5] = txtStaffCode.Text; prm[6] = CtrlAccType.Text; prm[7] = txtAccNo.Text; prm[8] = txtTrnStaffCode.Text; prm[9] = CtrlTrnAccType.Text; prm[10] = txtTrnAccNo.Text; prm[11] = Converter.GetDouble(txtTrnAmount.Text); prm[12] = txtDescription.Text; prm[13] = hdnCashCode.Text; prm[14] = lblPayType.Text; prm[15] = lblTrnPayType.Text; if (lblTrnAtyClass.Text == "5" || lblTrnAtyClass.Text == "6") { prm[16] = lblTrnAtyClass.Text; if (txtIntAmt.Text == string.Empty) { prm[17] = "0"; } else { prm[17] = txtIntAmt.Text; } if (txtPrincAmt.Text == string.Empty) { prm[18] = "0"; } else { prm[18] = txtPrincAmt.Text; } } else { prm[16] = "0"; prm[17] = "0"; prm[18] = "0"; } int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_CSAddStaffBalanceTransfer", prm, "A2ZCSMCUS")); if (result == 0) { PrintTrnVoucher(); //UpdatedSucessfullyMSG(); RemoveSession1(); //ClearScreen(); } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnUpdate_Click Problem');</script>"); //throw ex; } }
protected void BtnPost_Click(object sender, EventArgs e) { try { if (txtVchNo.Text == string.Empty) { txtVchNo.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Vch.No.');", true); return; } TrnVchDeplicate(); if (hdnMsgFlag.Text == "1") { return; } VerifyBenefitTransferPost(); if (lblPostFlag.Text == "0") { //A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue(); //int GLCode = Converter.GetInteger(dto.CashCode); int GLCode = Converter.GetInteger(hdnCashCode.Text); Int16 RecType = Converter.GetSmallInteger(1); A2ZRECCTRLNODTO getDTO = (A2ZRECCTRLNODTO.GetLastVoucherNo(GLCode, RecType)); CtrlVchNo.Text = "C" + GLCode + "-" + getDTO.RecLastNo; int result = 0; var prm = new object[4]; prm[0] = ddlAccType.SelectedValue; prm[1] = CtrlVchNo.Text; prm[2] = txtVchNo.Text.Trim(); prm[3] = hdnCashCode.Text; result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_CSUpdateTransferMonthlyBenefit", prm, "A2ZCSMCUS")); if (result == 0) { if (lblVPrintFlag.Text == "1") { PrintTrnVoucher(); } else { UpdateMSG(); } BtnCalculate.Visible = false; txtVchNo.Text = string.Empty; lblVchNo.Visible = true; txtVchNo.Visible = true; BtnPost.Visible = false; BtnPrint.Visible = true; BtnReverse.Visible = true; BtnExit.Visible = true; UpdateBackUpStat(); } } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnPost_Click Problem');</script>"); //throw ex; } }
protected void BtnProcess_Click(object sender, EventArgs e) { try { if (txtVchNo.Text == string.Empty && ddlFuncProceed.SelectedValue == "1") { InvalidVchMSG(); txtVchNo.Focus(); return; } if (ddlFuncProceed.SelectedValue == "0") { InvalidMSG(); return; } if (ddlFuncProceed.SelectedValue == "1") { TrnVchDeplicate(); if (VerifyFlag.Text == "1") { return; } } A2ZERPSYSPRMDTO dto = A2ZERPSYSPRMDTO.GetParameterValue(); CtrlSalPostStat.Text = Converter.GetString(dto.PrmSalPostStat); if (CtrlSalPostStat.Text == "0" && ddlFuncProceed.SelectedValue == "1") { ddlFuncProceed.SelectedIndex = 0; InvalidPostMSG(); return; } if (ddlFuncProceed.SelectedValue == "2") { VerifyReverseSalary(); if (VerifyFlag.Text == "1") { ddlFuncProceed.SelectedIndex = 0; return; } } if (ddlFuncProceed.SelectedValue == "1") { VerifyPostSalary(); if (VerifyFlag.Text == "1") { ddlFuncProceed.SelectedIndex = 0; return; } } if (ddlFuncProceed.SelectedValue == "1") { int GLCode = Converter.GetInteger(hdnCashCode.Text); Int16 RecType = Converter.GetSmallInteger(1); A2ZRECCTRLNODTO getDTO = (A2ZRECCTRLNODTO.GetLastVoucherNo(GLCode, RecType)); CtrlVchNo.Text = "C" + GLCode + "-" + getDTO.RecLastNo; } var prm = new object[4]; prm[0] = CtrlVchNo.Text; prm[1] = txtVchNo.Text; prm[2] = hdnID.Text; prm[3] = hdnCashCode.Text; if (ddlFuncProceed.SelectedValue == "1") { int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_HRPostSalaryTransaction", prm, "A2ZHRMCUS")); if (result == 0) { UpdateSalPostStat(); PostedMSG(); //return; } } if (ddlFuncProceed.SelectedValue == "2") { int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_HRReverseSalaryTransaction", "A2ZHRMCUS")); if (result == 0) { ReverseSalPostStat(); ReverseMSG(); //return; } } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnProcess_Click Problem');</script>"); //throw ex; } }
protected void BtnUpdate_Click(object sender, EventArgs e) { try { lblDuplicateVch.Text = "0"; if (txtVchNo.Text == string.Empty) { txtVchNo.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Vch.No.');", true); return; } TrnVchDeplicate(); if (lblDuplicateVch.Text == "1") { return; } if (txtDescription.Text == string.Empty) { txtDescription.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Please Input Transaction Description');", true); return; } BalanceChaeck(); if (ValidityFlag.Text == "1") { txtAmount.Text = string.Empty; txtAmount.Focus(); AccessAmountMSG(); return; } int GLCode = Converter.GetInteger(hdnCashCode.Text); Int16 RecType = Converter.GetSmallInteger(1); A2ZRECCTRLNODTO getDTO = (A2ZRECCTRLNODTO.GetLastVoucherNo(GLCode, RecType)); CtrlVoucherNo.Text = "C" + hdnCashCode.Text + "-" + getDTO.RecLastNo; // DateTime opdate = DateTime.ParseExact(txtTranDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); var prm = new object[7]; prm[0] = Converter.GetDateToYYYYMMDD(lblProcdate.Text); prm[1] = CtrlVoucherNo.Text; prm[2] = txtVchNo.Text; prm[3] = ddlTranMode.SelectedValue; prm[4] = txtDescription.Text; prm[5] = txtGLContraCode.Text; prm[6] = hdnCashCode.Text; int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_CSManualTransactionTransfer", prm, "A2ZCSMCUS")); if (result == 0) { Clear(); gvDetail(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Transfar Transaction Successfully Done');", true); return; } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnUpdate_Click Problem');</script>"); } }