protected void btnClear_Click(object sender, EventArgs e) { string rtMsg = ""; string strValues = ""; string strSPName = "spUpdate_TrnBankReconsiliationClear"; if (IsValidClearDate()) { strValues += PrepareXMLStringForClear(); rtMsg = gf.ExecuteAnySPOutput(strSPName, strValues); if (rtMsg == "True") { Message1.IsSuccess = true; Message1.Text = "Your request has been processed successfully!"; PopulateOutstanding(); PopulateHeaderGrid(); } } else { Message1.IsSuccess = false; Message1.Text = "Error"; } Message1.Show = true; Message.Show = false; }
protected void btnSave_Click(object sender, EventArgs e) { string rtMsg = ""; string strSPName = ""; strValues = ""; if (GroupID == 0) { strSPName = "spInsert_MstAccountsGroup"; } else { strValues = GroupID.ToString(); strSPName = "spUpdate_MstAccountsGroup"; } if (strValues == "") { strValues = Session["CompanyId"].ToString(); } else { strValues += chr.ToString() + Session["CompanyId"].ToString(); } strValues += chr.ToString() + txtGroupName.Text.Trim(); strValues += chr.ToString() + ddlGroupType.SelectedValue.Trim(); if (ddlGroupType.SelectedValue == "Main Group") { strValues += chr.ToString() + ""; } else { strValues += chr.ToString() + ddlUnderGroup.SelectedValue.Trim(); } strValues += chr.ToString() + ddlFirstAccountType.SelectedValue.Trim(); strValues += chr.ToString() + ddlSecondAccountType.SelectedValue.Trim(); strValues += chr.ToString() + ddlThirdAccountType.SelectedValue.Trim(); strValues += chr.ToString() + Session["BranchID"]; strValues += chr.ToString() + Session["FinYrID"]; strValues += chr.ToString() + Session["UserId"]; rtMsg = genObj.ExecuteAnySPOutput(strSPName, strValues); if (rtMsg == "True") { Message.IsSuccess = true; Message.Text = "Your request has been processed successfully!"; ResetControls(); PopulateGrid(); } else if (rtMsg == "Duplicate") { Message.IsSuccess = false; Message.Text = "This Account Group already exist!"; } Message.Show = true; }
protected void btnSave_Click(object sender, EventArgs e) { string strMessage = ""; string strMessageType = ""; string rtMsg = ""; //special character for string separation char chr = Convert.ToChar(130); string strSPName = ""; string strValues = ""; int intID = 0; if (hdnGroupTypeID.Value != "") { intID = Convert.ToInt32(hdnGroupTypeID.Value); } if (intID == 0) { strSPName = "spInsert_MstAccountsGroupType"; strValues = txtGroupType.Text.Trim(); } else { strValues = intID.ToString(); strValues += chr.ToString() + txtGroupType.Text.Trim(); strSPName = "spUpdate_MstAccountsGroupType"; } // Value for Accounts Group Type Table //if (strValues == "") // strValues = Session["SesCompanyID"].ToString(); //else // strValues += chr.ToString() + Session["SesCompanyID"].ToString(); // strValues += chr.ToString() + txtGroupType.Text.Trim(); strValues += chr.ToString() + ddlSecondAccountType.SelectedValue.Trim().ToString(); strValues += chr.ToString() + Session["UserId"]; strValues += chr.ToString() + Session["BranchID"]; strValues += chr.ToString() + Session["FinYrID"]; rtMsg = genObj.ExecuteAnySPOutput(strSPName, strValues); if (rtMsg == "True") { Message.IsSuccess = true; Message.Text = "Your request has been processed successfully!"; } else if (rtMsg == "Duplicate") { Message.IsSuccess = false; Message.Text = "This Account Grp. already exist!"; } else { Message.IsSuccess = false; Message.Text = "Database Error: " + rtMsg + ""; } //Grid View population strValues = "3" + chr.ToString() + "" + chr.ToString() + ""; genObj.BindGridViewSP(dgvGroupType, "spSelect_MstAccountsGroupType_ForAccountsGroupType", strValues); Message.Show = true; }
protected void btnSave_Click(object sender, EventArgs e) { string rtMsg = ""; char chr = Convert.ToChar(130); string strSPName = ""; string strValues = ""; int intID = Convert.ToInt32(ViewState["ID"].ToString()); if (intID == 0) { strSPName = "spInsert_MstCostCenter"; } else { strValues = intID.ToString(); strSPName = "spUpdate_MstCostCenter"; } // Value for Employee Table if (strValues == "") { strValues = Session["CompanyId"].ToString(); } else { strValues += chr.ToString() + Session["CompanyId"].ToString(); } strValues += chr.ToString() + txtCostCenter.Text.Trim().ToString(); strValues += chr.ToString() + Session["BranchID"]; strValues += chr.ToString() + Session["FinYrID"]; strValues += chr.ToString() + Session["UserId"]; rtMsg = genObj.ExecuteAnySPOutput(strSPName, strValues); if (rtMsg == "True") { Message.IsSuccess = true; Message.Text = "Your request has been processed successfully!"; } else if (rtMsg == "Duplicate") { Message.IsSuccess = false; Message.Text = "This Cost Center name already exist!"; } ResetControls(); Message.Show = true; strValues = Session["CompanyId"].ToString(); strValues += chr.ToString() + ""; genObj.BindGridViewSP(gvCostCenter, "spSelect_MstCostCenter", strValues); }
protected void btnAdd_Click(object sender, EventArgs e) { string strSpParams = ""; string rtMsg = ""; string strMessage = ""; string strStartYr = txtStartYr.Text.Trim(); string strEndYr = txtEndYr.Text.Trim(); string strActive = ""; if (chkActive.Checked) { strActive = "true"; } else { strActive = "false"; } strSpParams = strStartYr + chr.ToString() + strEndYr + chr.ToString() + strActive; strSpParams += chr.ToString() + Session["UserId"].ToString() + chr.ToString() + ""; try { rtMsg = genObj.ExecuteAnySPOutput("spInsert_MstFinancialYear", strSpParams); if (rtMsg == "True") { Message.IsSuccess = true; Message.Text = "Your request has been processed successfully!"; } else if (rtMsg == "Duplicate") { Message.IsSuccess = false; Message.Text = "This Financial Year already exist!"; } genObj.BindGridViewSP(gdFinancialYr, "spSelect_MstFinancialYear_New", ""); } catch (Exception exp) { objConn.closeConnection(); Message.IsSuccess = false; Message.Text = "An Unhandled Exception Occured!"; } Message.Show = true; }
protected void btnSave_Click(object sender, EventArgs e) { if (Session["Details"] == null || ((DataSet)Session["Details"]).Tables[0].Rows.Count == 0) { Response.Redirect("../Login.aspx"); } else { if (Validate()) { string rtMsg = ""; string strSPName = ""; string strValues = ""; int intID; strValues = DateTime.Now.ToString("dd MMM yyyy"); strValues += chr.ToString() + ""; DataSet ds_fn = gf.ExecuteSelectSP("spSelect_GetFnYear", strValues); strValues = ""; //if (ds_fn.Tables[0].Rows[0]["FinYearID"].ToString() == Session["FinYrID"].ToString().Trim()) //{ intID = Convert.ToInt32(hdnCBVHeaderID.Value); if (intID == 0) { //btnPrint.Enabled = false; strSPName = "spInsert_TrnCashBankVoucher"; } else { strValues = intID.ToString(); strSPName = "spUpdate_TrnCashBankVoucher"; } ds = (DataSet)Session["Details"]; if (strValues == "") { strValues = Session["CompanyId"].ToString(); } else { strValues += chr.ToString() + Session["CompanyId"].ToString(); } strValues += chr.ToString() + Session["FinYrID"].ToString(); strValues += chr.ToString() + Session["BranchID"].ToString(); strValues += chr.ToString() + Session["DataFlow"].ToString(); strValues += chr.ToString() + txtVoucherDate.Text.Trim(); strValues += chr.ToString() + ddlType.SelectedItem.ToString(); //strValues += chr.ToString() + ((ddlDRCR.SelectedValue == "RECEIVE") ? "PAYMENT" : "RECEIVE"); strValues += chr.ToString() + "CASH"; strValues += chr.ToString() + ddlSourceLedger.SelectedValue.ToString(); strValues += chr.ToString() + ""; strValues += chr.ToString() + ""; strValues += chr.ToString() + ""; strValues += chr.ToString() + txtAccount.Text; //@OnAccountAmount strValues += chr.ToString() + txtAccount.Text; // @TotalAmount strValues += chr.ToString() + txtNarration.Text.Trim(); strValues += chr.ToString() + Session["UserId"].ToString(); strValues += chr.ToString() + PrepareXMLString(); //strValues += chr.ToString() + PrepareDistrictAmountXMLString(); strValues += chr.ToString() + ""; rtMsg = gf.ExecuteAnySPOutput(strSPName, strValues); string strMsg = rtMsg.Substring(0, 4); if (strMsg == "True") { hdnCBVHeaderID.Value = rtMsg.Substring(5, rtMsg.Length - 5); // Meeting Rent Expense Save District Amount BusinessLayer.Accounts.MeetingRentExpense objMeet = new MeetingRentExpense(); Entity.Accounts.MeetingRentExpense EntMeet = new Entity.Accounts.MeetingRentExpense(); EntMeet.CBVHeaderID = Convert.ToInt32(hdnCBVHeaderID.Value); EntMeet.PaymentDate = DateTime.Parse(txtVoucherDate.Text.ToString()); EntMeet.DistrictAmountXML = PrepareDistrictAmountXMLString(); EntMeet.CreatedBy = int.Parse(Session["UserId"].ToString()); int RowAffected = objMeet.SaveDetails(EntMeet); // *** CLOSE *** PopulatePage(Convert.ToInt32(hdnCBVHeaderID.Value)); Message.IsSuccess = true; Message.Text = "Your request has been processed successfully!"; //ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "VR", "window.open('sms-receipt.aspx?No=" + txtVchNo.Text + "','','height=600,width=1000')", true); AdjustButtons(true, true, false); PopulateHeaderGrid(ViewState["sortColumn"].ToString(), ViewState["sortDirection"].ToString()); } else { Message.IsSuccess = false; Message.Text = rtMsg; } } //} //else //{ // Message.IsSuccess = false; //Message.Text = "Please select a Date Between " + Session["SesFromDate"].ToString() + " & " + Session["SesToDate"].ToString() + ""; // } } Message.Show = true; }
protected void btnSave_Click(object sender, EventArgs e) { if (Validate()) { char chr = Convert.ToChar(130); string strSPName = ""; string strValues = ""; if (LedgerID == 0) { strSPName = "spInsert_MstGeneralLedger"; } else { strValues = LedgerID.ToString(); strSPName = "spUpdate_MstGeneralLedger"; } // Value for BankAccount Table if (strValues == "") { strValues = Session["CompanyId"].ToString(); } else { strValues += chr.ToString() + Session["CompanyId"].ToString(); } strValues += chr.ToString() + Session["FinYrID"].ToString(); strValues += chr.ToString() + Session["BranchID"].ToString(); strValues += chr.ToString() + txtLedgerName.Text.Trim().ToString(); strValues += chr.ToString() + ddlGroup.SelectedValue.Trim().ToString(); strValues += chr.ToString() + ddlSubGroup.SelectedValue.Trim().ToString(); if (chkCostCenter.Checked) { strValues += chr.ToString() + "True"; } else { strValues += chr.ToString() + "False"; } strValues += chr.ToString() + ddlLedgerType.SelectedValue.Trim().ToString(); //strValues += chr.ToString() + "True"; if (chkIsActive.Checked) { strValues += chr.ToString() + "True"; } else { strValues += chr.ToString() + "False"; } strValues += chr.ToString() + txtOpeningBalance.Text.Trim().ToString(); strValues += chr.ToString() + ddlOpeningBalanceType.SelectedValue.Trim(); strValues += chr.ToString() + Session["UserId"]; strValues += chr.ToString() + Session["DataFlow"].ToString(); strValues += chr.ToString() + txtOpBalDate.Text.Trim().ToString(); strValues += chr.ToString() + ""; strValues += chr.ToString() + ""; strValues += chr.ToString() + ""; strValues += chr.ToString() + ""; strValues += chr.ToString() + ""; strValues += chr.ToString() + "1"; strValues += chr.ToString() + "1"; strValues += chr.ToString() + "1"; strValues += chr.ToString() + ""; strValues += chr.ToString() + ""; strValues += chr.ToString() + ""; strValues += chr.ToString() + ""; strValues += chr.ToString() + ""; strValues += chr.ToString() + ""; strValues += chr.ToString() + ""; string rtMsg = genObj.ExecuteAnySPOutput(strSPName, strValues); if (rtMsg == "True") { Message.IsSuccess = true; Message.Text = "Your request has been processed successfully!"; ResetControls(); PopulateGrid(null); } else if (rtMsg == "Duplicate") { Message.IsSuccess = false; Message.Text = "This General Ledger already exist!"; } } Message.Show = true; }
private void SaveVoucherDetails() { string rtMsg = ""; string Msg = ""; string strSPName = ""; strValues = ""; if (CVHeaderID == 0) { strSPName = "spInsert_TrnContraVoucher"; } else { strValues = CVHeaderID.ToString(); strSPName = "spUpdate_TrnCONTRAVoucher"; } if (strValues == "") { strValues = txtVchNo.Text.Trim(); } else { strValues += chr.ToString() + txtVchNo.Text.Trim(); } strValues += chr.ToString() + Session["CompanyId"].ToString().Trim(); strValues += chr.ToString() + Session["FinYrID"].ToString().Trim(); strValues += chr.ToString() + Session["BranchId"].ToString().Trim(); strValues += chr.ToString() + Session["DataFlow"].ToString().Trim(); strValues += chr.ToString() + txtVoucherDate.Text.ToString().Trim(); strValues += chr.ToString() + "1"; strValues += chr.ToString() + ddlLedger.SelectedValue.Trim(); strValues += chr.ToString() + ddlDrCr.SelectedValue.Trim(); if (txtChequeNo.Text.Trim() == "") { strValues += chr.ToString() + "CASH"; } else { strValues += chr.ToString() + "CHEQUE"; } strValues += chr.ToString() + txtChequeNo.Text.Trim(); strValues += chr.ToString() + txtChequeDate.Text.Trim(); strValues += chr.ToString() + txtDrawnOn.Text.Trim(); strValues += chr.ToString() + ddlParentLedger.SelectedValue.Trim(); strValues += chr.ToString() + txtAmount.Text.Trim(); strValues += chr.ToString() + txtNarration.Text.ToString().Trim(); strValues += chr.ToString() + Session["UserId"].ToString().Trim(); rtMsg = gf.ExecuteAnySPOutput(strSPName, strValues); Msg = rtMsg.Substring(0, 4); if (Msg == "True") { CVHeaderID = Convert.ToInt32(rtMsg.Substring(5, rtMsg.Length - 5)); PopulateHeaderGrid(); PopulatePage(); Message.IsSuccess = true; Message.Text = "Your request has been processed successfully!"; } else { if (rtMsg == "Duplicate:") { Message.IsSuccess = false; Message.Text = "This Voucher No. is already exists!"; } } Message.Show = true; }
protected void btnSave_Click(object sender, EventArgs e) { string rtMsg = ""; string strSPName = ""; strValues = ""; if (Validate()) { if (BankID == 0) { strSPName = "spInsert_MstBankAccount"; } else { strValues = BankID.ToString(); strSPName = "spUpdate_MstBankAccount"; } // Value for BankAccount Table if (strValues == "") { strValues = Session["CompanyID"].ToString(); } else { strValues += chr.ToString() + Session["CompanyID"].ToString(); } strValues += chr.ToString() + Session["BranchID"].ToString(); strValues += chr.ToString() + ddlBankName.SelectedValue.Trim().ToString(); strValues += chr.ToString() + txtACNo.Text.Trim().ToString(); strValues += chr.ToString() + ddlACType.SelectedValue.Trim().ToString(); strValues += chr.ToString() + txtBankBranch.Text.Trim().ToString(); strValues += chr.ToString() + txtACOpngDate.Text; strValues += chr.ToString() + txtAddress.Text.Trim().ToString(); strValues += chr.ToString() + txtBankContactNo.Text.Trim().ToString(); strValues += chr.ToString() + txtContactPerson.Text.Trim().ToString(); strValues += chr.ToString() + txtMobileNo.Text.Trim().ToString(); strValues += chr.ToString() + ddlOperatedBy.SelectedValue.Trim().ToString(); if (chkActive.Checked) { strValues += chr.ToString() + "True"; } else { strValues += chr.ToString() + "False"; } strValues += chr.ToString() + Session["FinYrID"]; strValues += chr.ToString() + ddlBankName.SelectedItem.Text.Trim().ToString(); strValues += chr.ToString() + ddlGroup.SelectedValue.Trim().ToString(); strValues += chr.ToString() + ddlSubGoup.SelectedValue.Trim().ToString(); if (ChkCostCentreApplble.Checked) { strValues += chr.ToString() + "True"; } else { strValues += chr.ToString() + "False"; } strValues += chr.ToString() + txtOpBal.Text.Trim().ToString(); strValues += chr.ToString() + ddlOpBalType.SelectedValue.Trim().ToString(); strValues += chr.ToString() + Session["UserId"]; //if (intID == 0) strValues += chr.ToString() + Session["DataFlow"]; strValues += chr.ToString() + txtOpBalDate.Text.Trim().ToString(); strValues += chr.ToString() + txtAccountBalance.Text.Trim(); rtMsg = genObj.ExecuteAnySPOutput(strSPName, strValues); if (rtMsg == "True") { Message.IsSuccess = true; Message.Text = "Your request has been processed successfully!"; ResetControls(); PopulateGrid(); } else if (rtMsg == "Duplicate") { Message.IsSuccess = false; Message.Text = "This Account No. already exist!"; } } Message.Show = true; }
private void SaveVoucherDetails() { string rtMsg = ""; string Msg = ""; string strSPName = ""; string strValues = ""; dsD = ((DataSet)Session["SOD"]); if (dsD.Tables[0].Rows.Count == 0) { Message.IsSuccess = false; Message.Text = "Please select any Item for Order!"; Message.Show = true; return; } if (hdnJournalID.Value == "0") { strSPName = "spInsert_TrnJournalVoucher"; } else { strSPName = "spUpdate_TrnJournalVoucher"; } //if() strValues = hdnJournalID.Value.ToString().Trim(); strValues += chr.ToString() + txtVchNo.Text.ToString().Trim(); strValues += chr.ToString() + Session["CompanyId"].ToString().Trim(); strValues += chr.ToString() + Session["FinYrID"].ToString().Trim(); strValues += chr.ToString() + Session["BranchId"].ToString().Trim(); strValues += chr.ToString() + Session["DataFlow"].ToString().Trim(); strValues += chr.ToString() + txtVchDate.Text.ToString().Trim(); strValues += chr.ToString() + "1"; strValues += chr.ToString() + txtNarration.Text.ToString().Trim(); strValues += chr.ToString() + Session["UserId"].ToString().Trim(); strValues += chr.ToString() + PrepareXMLString(); rtMsg = gf.ExecuteAnySPOutput(strSPName, strValues); Msg = rtMsg.Substring(0, 4); //strvchnoshow=rtMsg[1].ToString(); if (Msg == "True") { hdnJournalID.Value = rtMsg.Substring(5, rtMsg.Length - 5); ViewState["ID"] = hdnJournalID.Value; BlankDataSet(); PopulatePageControl(Convert.ToInt32(hdnJournalID.Value)); Message.IsSuccess = true; Message.Text = "Your request has been processed successfully!"; AdjustButtons(true, true, true, false); PopulateHeaderGrid(ViewState["sortColumn"].ToString(), ViewState["sortDirection"].ToString()); } else { if (rtMsg == "Duplicate:") { Message.IsSuccess = false; Message.Text = "This Voucher No. is already exists!"; } else if (rtMsg == "Blank:") { Message.IsSuccess = false; Message.Text = "Voucher No. can not be blank, please set the AutoCode master!"; } else { } AdjustButtons(true, true, false, false); } Message.Show = true; }