protected void btnSearch_Click(object sender, EventArgs e) { if (txtLCOSearch.Text.Trim() != "") { lblmsg.Text = ""; string customerId = Request.Form[hfCustomerId.UniqueID]; string customerName = Request.Form[txtLCOSearch.UniqueID]; Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); string cat_id = ""; string oper_id = ""; string logged_in_user = ""; if (HttpContext.Current.Session["category"] != null && HttpContext.Current.Session["operator_id"] != null) { cat_id = HttpContext.Current.Session["category"].ToString(); oper_id = HttpContext.Current.Session["operator_id"].ToString(); logged_in_user = HttpContext.Current.Session["username"].ToString(); } string[] responceStr = obj.GetLcoCashpaymentDetails(logged_in_user, txtLCOSearch.Text.Trim(), cat_id, oper_id); if (responceStr.Length != 0) { lblLcoCode.Text = responceStr[0].Trim(); lblLcoName.Text = responceStr[1].Trim(); lblLcoAddr.Text = responceStr[2].Trim(); lblLcoMobno.Text = responceStr[3].Trim(); lblLcoEmail.Text = responceStr[4].Trim(); lblLcoAmt.Text = responceStr[5].Trim(); lblLcoPaymode.Text = (responceStr[6].Trim() == "C") ? "Cash" : ((responceStr[6].Trim() == "Q") ? "Cheque" : ((responceStr[6].Trim() == "DD") ? "Demand Draft" : ((responceStr[6].Trim() == "N") ? "NEFT" : ""))); //(responceStr[6].Trim() == "C") ? "Cash" : ((responceStr[6].Trim() == "Q") ? "Cheque" : ""); ViewState["ReceiptNo"] = responceStr[7].Trim(); DataSet ds = Cls_Helper.Comboupdate("aoup_reasons_def", "num_reason_id", "var_reason_name"); ddlReason.DataSource = ds; ddlReason.DataTextField = "var_reason_name"; ddlReason.DataValueField = "num_reason_id"; ddlReason.DataBind(); ds.Dispose(); ddlReason.Items.Insert(0, "Select Reason"); divdet.Visible = true; } else { msgbox("Invalid Receipt", txtLCOSearch); reset(); return; } } else { msgbox("Please Enter Receipt No.", txtLCOSearch); return; } }
protected void btnSubmit_Click(object sender, EventArgs e) { Cls_Data_Auth auth = new Cls_Data_Auth(); string Ip = auth.GetIPAddress(HttpContext.Current.Request); if (txtLCOSearch.Text.Trim() == "") { msgbox("Please Enter Receipt No.", txtLCOSearch); return; } else if (ddlReason.SelectedIndex == 0) { msgbox("Please select Reason", ddlReason); return; } else if (txtRemark.Text.Trim() == "") { msgbox("Please enter remark", txtRemark); return; } Hashtable ht = new Hashtable(); string loggedInUser; if (Session["username"] != null) { loggedInUser = Session["username"].ToString(); } else { Session.Abandon(); Response.Redirect("~/Login.aspx"); return; } ht.Add("User", loggedInUser); // ht.Add("LcoCode", Convert.ToInt32(lblLcoCode.Text.Trim())); ht.Add("LcoCode", lblLcoCode.Text.Trim()); ht.Add("ReceiptNo", ViewState["ReceiptNo"].ToString()); ht.Add("Amount", Convert.ToInt32(lblLcoAmt.Text.Trim())); ht.Add("Remark", txtRemark.Text.Trim()); ht.Add("Reason", ddlReason.SelectedValue.ToString()); ht.Add("IP", Ip); Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); string response = obj.LcoCashPaymentRevarsal(ht); reset(); if (response == "ex_occured") { Response.Redirect("~/ErrorPage.aspx"); return; } lblmsg.Text = response; }
protected String getcitrusdetail() { string Citrusflag = "N"; lblmsg.Text = ""; string str = ""; Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); string ConStr = ConfigurationSettings.AppSettings["ConString"].ToString().Trim(); OracleConnection conObj = new OracleConnection(ConStr); try { str = " select b.var_comp_citrux_flag from aoup_lcopre_lco_det a,aoup_lcopre_company_det b,aoup_lcopre_city_def c "; str += " where a.var_lcomst_company=b.var_comp_company and a.num_lcomst_cityid=c.num_city_id and b.var_comp_city=c.var_city_name "; if (Convert.ToString(Session["category"]) == "11") { str += " and a.var_lcomst_code ='" + ddllco.SelectedValue + "'"; } else if (Convert.ToString(Session["category"]) == "3") { str += " and a.var_lcomst_code ='" + Session["username"].ToString() + "'"; } else { Citrusflag = "N"; } DataTable tbllco = GetResult(str); if (tbllco.Rows.Count > 0) { Citrusflag = tbllco.Rows[0]["var_comp_citrux_flag"].ToString(); } else { Citrusflag = "N"; } } catch (Exception ex) { Citrusflag = "N"; Response.Write("Error while online payment : " + ex.Message.ToString()); } finally { conObj.Close(); conObj.Dispose(); } return(Citrusflag); }
protected void btnSearch_Click(object sender, EventArgs e) { btnSubmit.Visible = true; lblmsg.Text = ""; if (txtLCOSearch.Text.Trim() != "") { string customerId = Request.Form[hfCustomerId.UniqueID]; string customerName = Request.Form[txtLCOSearch.UniqueID]; Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); string operator_id = ""; string category_id = ""; if (Session["operator_id"] != null && Session["category"] != null) { operator_id = Convert.ToString(Session["operator_id"]); category_id = Convert.ToString(Session["category"]); } string[] responseStr = obj.getLcodetails(username, txtLCOSearch.Text.Trim(), RadSearchby.SelectedValue, operator_id, category_id); if (responseStr.Length != 0) { lblCustNo.Text = responseStr[0].Trim(); lblCustName.Text = responseStr[1].Trim(); lblCustAddr.Text = responseStr[2].Trim(); lblmobno.Text = responseStr[3].Trim(); lblEmail.Text = responseStr[4].Trim(); lblCurrBalance.Text = responseStr[5].Trim(); divdet.Visible = true; LCOAccordion.Visible = true; LCOAccordion.SelectedIndex = 0; } else { msgbox("No Such LCO Found", txtLCOSearch); LCOAccordion.Visible = false; return; } } else { msgbox("Please Select LCO by code or name", txtLCOSearch); LCOAccordion.Visible = false; return; } }
protected void btnSearch_Click(object sender, EventArgs e) { string customerId = Request.Form[hfCustomerId.UniqueID]; string customerName = Request.Form[txtUSERSearch.UniqueID]; if (txtUSERSearch.Text.Trim() != "0") { Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); string[] responseStr = obj.getLcodetails(username, txtUSERSearch.Text, RadSearchby.SelectedValue, operid, catid); if (responseStr.Length != 0) { lblCustNo.Text = responseStr[0].Trim(); lblCustName.Text = responseStr[1].Trim(); lblCustAddr.Text = responseStr[2].Trim(); lblmobno.Text = responseStr[3].Trim(); lblEmail.Text = responseStr[4].Trim(); DataSet ds = Cls_Helper.Comboupdate("aoup_bank_def", "num_bank_id", "var_bank_name"); ddlBankName.DataSource = ds; ddlBankName.DataTextField = "var_bank_name"; ddlBankName.DataValueField = "num_bank_id"; ddlBankName.DataBind(); ds.Dispose(); ddlBankName.Items.Insert(0, "Select Bankname"); divdet.Visible = true; } else { msgbox("No Such LCO Found", txtUSERSearch); return; } } else { msgbox("Please Select LCO by code or name", txtUSERSearch); return; } }
protected void Page_Load(object sender, EventArgs e) { string rcpt_no = ""; string rcpt_Online_no = ""; string date = ""; string cashier_name = ""; string address = ""; string company = ""; string lco_code = ""; string lco_name = ""; string amount = ""; string pay_mode = ""; string cheque_no = ""; string bank_name = ""; string remark = ""; string username = ""; string base_amt = ""; string st = ""; string st_smt = ""; string ec = ""; string ec_amt = ""; string hec = ""; string hec_amt = ""; string et = ""; string et_amt = ""; if (Session["username"] != null && Session["username"] != "") { username = Session["username"].ToString(); } else { Session.Abandon(); Response.Redirect("~/Login.aspx"); } if (Session["rcpt_pt_rcptno1"] == null || Session["rcpt_pt_date1"] == null || Session["rcpt_pt_lcocd1"] == null || Session["rcpt_pt_amt1"] == null) { if (Session["rcpt_pt_paymode1"] != null) { if (Session["rcpt_pt_paymode1"].ToString() == "Online") { Response.Redirect("~/Transaction/TransHwayOnlinePayResponse.aspx"); } else { Response.Redirect("~/Transaction/TransHwayLcoPayment.aspx"); } } } if (Session["rcpt_pt_rcptno1"] != null) { rcpt_no = Session["rcpt_pt_rcptno1"].ToString(); } if (Session["rcpt_pt_rcptno2"] != null) { rcpt_Online_no = Session["rcpt_pt_rcptno2"].ToString(); } if (Session["rcpt_pt_date1"] != null) { date = Session["rcpt_pt_date1"].ToString(); } if (Session["rcpt_pt_cashiername"] != null) { cashier_name = Session["rcpt_pt_cashiername"].ToString(); } if (Session["rcpt_pt_address"] != null) { address = Session["rcpt_pt_address"].ToString(); } if (Session["rcpt_pt_company"] != null) { company = Session["rcpt_pt_company"].ToString(); } if (Session["rcpt_pt_lcocd1"] != null) { lco_code = Session["rcpt_pt_lcocd1"].ToString(); } if (Session["rcpt_pt_lconm1"] != null) { lco_name = Session["rcpt_pt_lconm1"].ToString(); } if (Session["rcpt_pt_amt1"] != null) { amount = Session["rcpt_pt_amt1"].ToString(); } if (Session["rcpt_pt_paymode1"] != null) { pay_mode = Session["rcpt_pt_paymode1"].ToString(); } if (Session["rcpt_pt_cheqno1"] != null) { cheque_no = Session["rcpt_pt_cheqno1"].ToString(); } if (Session["rcpt_pt_bnknm1"] != null) { bank_name = Session["rcpt_pt_bnknm1"].ToString(); } if (Session["rcpt_pt_premark1"] != null) { remark = Session["rcpt_pt_premark1"].ToString(); } //if (Session["rcpt_pt_details"] != null) //{ // details = Session["rcpt_pt_details"].ToString(); //} //Session["cashier"] = Session["name"].ToString(); if (pay_mode.Trim() == "Cash") { bank_name = "N/A"; cheque_no = "N/A"; } if (pay_mode.Trim() == "Online") { tdOnline1.Visible = true; tdOnline2.Visible = true; tdOnline3.Visible = true; tdOnline4.Visible = true; tdOnline5.Visible = true; tdOnline6.Visible = true; lblonlineReceipt1.Text = rcpt_Online_no; lblonlineReceipt.Text = rcpt_Online_no; lblonlineR2.Text = rcpt_Online_no; lblonlineR1.Text = rcpt_Online_no; trOnline1.Visible = true; trOnline.Visible = true; trCash.Visible = false; trCash1.Visible = false; lblReceiptTitle.Text = "RECEIPT"; lblReceiptTitle1.Text = "RECEIPT"; lblCashier.Visible = false; lblCashierName.Visible = false; lblCashier1.Visible = false; lblCashierName2.Visible = false; } else { tdOnline1.Visible = false; tdOnline2.Visible = false; tdOnline3.Visible = false; tdOnline4.Visible = false; tdOnline5.Visible = false; tdOnline6.Visible = false; lblonlineReceipt.Text = "N/A"; lblCashierName.Visible = true; lblCashier.Visible = true; lblCashier1.Visible = true; lblCashierName2.Visible = true; lblReceiptTitle.Text = "RECEIPT cum INVOICE"; lblReceiptTitle1.Text = "RECEIPT cum INVOICE"; trOnline1.Visible = false; trCash1.Visible = true; trCash.Visible = true; } lblCompanyName.Text = company; lblCompanyName2.Text = company; lblRemark.Text = remark; lblRemark2.Text = remark; lblBankName.Text = bank_name; lblBankName2.Text = bank_name; lblChequeDDNo.Text = cheque_no; lblChequeDDNo2.Text = cheque_no; lblPaymentMode.Text = pay_mode; lblPaymentMode2.Text = pay_mode; lblAmount.Text = amount; lblAmount2.Text = amount; lblAmout2.Text = amount; hdnAmount.Value = amount; lblAmout1.Text = amount; lblLcoCode.Text = lco_code; lblLcoCode2.Text = lco_code; lblLcoName.Text = lco_name; lblLcoName2.Text = lco_name; lblAddress.Text = address; lblAddress2.Text = address; lblCashierName.Text = cashier_name; lblCashierName2.Text = cashier_name; lblRcptDate.Text = date; lblRcptDate2.Text = date; lblRcptNo.Text = rcpt_no; lblRcptNo2.Text = rcpt_no; Cls_BLL_TransHwayLcoPayment objpan = new Cls_BLL_TransHwayLcoPayment(); string[] details = objpan.getPanDetails(username, company); if (details != null) { try { lblCIN.Text = details[0]; lblCIN2.Text = details[0]; lblPAN.Text = details[1]; lblPAN2.Text = details[1]; lblSTNO.Text = details[2]; lblSTNO2.Text = details[2]; lblCompanyName.Text = details[3]; lblCompanyName2.Text = details[3]; address = details[3]; lblAddress12.Text = address; lblAddress13.Text = address; lblAddress22.Text = address; lblAddress23.Text = address; } catch (Exception ex) { } } Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); string[] tax_det = obj.getTaxDetails(username, rcpt_no); base_amt = tax_det[8]; st = tax_det[2]; st_smt = tax_det[3]; ec = tax_det[4]; ec_amt = tax_det[5]; hec = tax_det[6]; hec_amt = tax_det[7]; et = tax_det[0]; et_amt = tax_det[1]; lblBaseAmt.Text = base_amt; lblBaseAmt2.Text = base_amt; lblST.Text = (Convert.ToDouble(st) * 100).ToString(); lblST2.Text = (Convert.ToDouble(st) * 100).ToString(); lblSTAmt.Text = st_smt; lblSTAmt2.Text = st_smt; lblHEC.Text = (Convert.ToDouble(hec) * 100).ToString(); lblHEC2.Text = (Convert.ToDouble(hec) * 100).ToString(); lblHECAmt.Text = hec_amt; lblHECAmt2.Text = hec_amt; lblEC.Text = (Convert.ToDouble(ec) * 100).ToString(); lblEC2.Text = (Convert.ToDouble(ec) * 100).ToString(); lblECAmt.Text = ec_amt; lblECAmt2.Text = ec_amt; lblET.Text = (Convert.ToDouble(et) * 100).ToString(); lblET2.Text = (Convert.ToDouble(et) * 100).ToString(); lblETAmt.Text = et_amt; lblETAmt2.Text = et_amt; if (et == "0") { tr1.Visible = false; trET.Visible = false; } else { tr1.Visible = true; trET.Visible = true; } }
protected void btnSubmit_Click(object sender, EventArgs e) { string blusername = SecurityValidation.chkData("N", txtCashAmt.Text); if (blusername.Length > 0) { msgbox(blusername, lblCustNo); return; } blusername = SecurityValidation.chkData("T", txtRemark.Text); if (blusername.Length > 0) { msgbox(blusername, lblCustNo); return; } if (ViewState["Allowcitrus"].ToString() == "Y") { if (rdoBill.Checked == false && rdcitrus.Checked == false) { msgbox("Please Select Gateway", lblCustNo); return; } } lblmsg.Text = ""; Cls_Data_Auth auth = new Cls_Data_Auth(); string Ip = auth.GetIPAddress(HttpContext.Current.Request); if (lblCustNo.Text.Trim() == "") { msgbox("Please Select LCO", lblCustNo); return; } else if (txtCashAmt.Text.Trim() == "") { msgbox("Please Enter Amount", txtCashAmt); return; } try { if (Convert.ToInt64(txtCashAmt.Text.Trim()) > Convert.ToInt64(HdnMaxamount.Value)) { msgbox("Please Enter Amount less than or Equal to " + HdnMaxamount.Value, txtCashAmt); return; } } catch { } if (txtRemark.Text.Length > 0) { string valid = SecurityValidation.chkData("T", txtRemark.Text); if (valid != "") { lblmsg.Text = valid.ToString(); return; } } btnSubmit.Visible = false; Hashtable ht = new Hashtable(); string loggedInUser; if (Session["username"] != null) { if (Convert.ToString(Session["category"]) == "3") { loggedInUser = Session["username"].ToString(); } else { loggedInUser = ddllco.SelectedValue; //Session["username"].ToString(); } } else { Session.Abandon(); Response.Redirect("~/Login.aspx"); return; } String PaymentFlag = "BD"; if (ViewState["Allowcitrus"].ToString() == "Y") { Tr2.Visible = true; if (rdoBill.Checked == true) { PaymentFlag = "BD"; } else { PaymentFlag = "CT"; } } else { Tr2.Visible = false; PaymentFlag = "BD"; } ht.Add("User", loggedInUser); ht.Add("CustCode", loggedInUser); ht.Add("Amount", Convert.ToInt32(txtCashAmt.Text.Trim())); ht.Add("PayMode", "O"); ht.Add("chequeddno", "N/A"); ht.Add("CheckDate", DateTime.MinValue); ht.Add("BankName", "*"); ht.Add("Branch", "*"); ht.Add("Remark", txtRemark.Text.Trim()); ht.Add("ReceiptNo", "*"); ht.Add("IP", Ip); ht.Add("user_id", Session["user_id"]); ht.Add("user_brmpoid", Session["user_brmpoid"]); ht.Add("operator_id", Session["operator_id"]); ht.Add("category", Session["category"]); ht.Add("name", Session["name"]); ht.Add("last_login", Session["last_login"]); ht.Add("login_flag", Session["login_flag"]); string sessionId = "(S(" + Session.SessionID.ToString() + "))"; ht.Add("Session", sessionId); ht.Add("Identifier", PaymentFlag); ht.Add("CrLimittype", "INV"); Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); // string response = obj.LcoPayment(ht); //reset(); string response = ""; Hashtable transreceipt = obj.InverntryOnlinePaymentTransID(ht); int TransID = Convert.ToInt32(transreceipt["Transid"]); //int TransID = obj.LcoOnlinePaymentTransID(ht); if (TransID != 0) { PrjUpassDAL.Helper.Cls_Validation bojValidation = new PrjUpassDAL.Helper.Cls_Validation(); string strTransCode = "HATH";// bojValidation.lcoTransCode(loggedInUser); if (strTransCode.Length > 0) { int TranAmt = Convert.ToInt32(txtCashAmt.Text.Trim()); string RetrnUrl = "http://124.153.73.21/HwayLCOSMSUAT/Transaction/TransHwayInventryOnlinePayRes.aspx"; //string RetrnUrl = "http//124.153.73.21/HwayLCOSMSUAT/Transaction/TransHwayInventryOnlinePayRes.aspx"; // string RetrnUrl = "http://localhost:11772/Transaction/TransHwayInventryOnlinePayRes.aspx"; if (PaymentFlag == "BD") { Response.Redirect("http://124.153.73.21/UbillDesk/Request.aspx?CompanyCode=10001&TransNo=" + TransID + "&Amount=" + TranAmt + "&ReturnURL=" + RetrnUrl + "&AdditionalInfo2=" + strTransCode + "&AdditionalInfo3=" + loggedInUser + "&AdditionalInfo4=" + Convert.ToString(transreceipt["receipt"])); } else { Response.Redirect("http://hathwayconnect.com/UbillDesk/Request.aspx?CompanyCode=20002&TransNo=" + TransID + "&Amount=" + TranAmt + "&ReturnURL=" + RetrnUrl + "&AdditionalInfo2=" + strTransCode + "&AdditionalInfo3=" + loggedInUser + "&AdditionalInfo4=" + Convert.ToString(transreceipt["receipt"])); } } } }
protected void ddllco_SelectedIndexChanged(object sender, EventArgs e) { lblmsg.Text = ""; string str = ""; Session["lco_username"] = ddllco.SelectedValue; SetBalance(); Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); string ConStr = ConfigurationSettings.AppSettings["ConString"].ToString().Trim(); OracleConnection conObj = new OracleConnection(ConStr); if (ddllco.SelectedValue != "0") { str = " SELECT a.lcoid, a.distid, a.msoid, a.hoid, a.lcomstcode, a.lcomstname, "; str += " a.lcomstaddress, a.lcomstmobileno, a.lcomstemail, "; str += " a.currentcreditlimit "; str += " FROM veiw_lcopre_paylco_search a "; str += " where a.lcomstcode='" + ddllco.SelectedValue + "'"; OracleCommand cmd = new OracleCommand(str, conObj); conObj.Open(); List <string> Operators = new List <string>(); OracleDataReader dr = cmd.ExecuteReader(); if (dr.HasRows) { while (dr.Read()) { lblCustNo.Text = dr["LCOMSTCODE"].ToString(); ViewState["lcocode"] = dr["LCOMSTCODE"].ToString(); lblCustName.Text = dr["LCOMSTNAME"].ToString(); lblCustAddr.Text = dr["LCOMSTEMAIL"].ToString(); lblmobno.Text = dr["LCOMSTMOBILENO"].ToString(); lblEmail.Text = dr["LCOMSTEMAIL"].ToString(); // lblCurrBalance.Text = dr["CURRENTCREDITLIMIT"].ToString(); } Paydet.Visible = true; btnSubmit.Visible = true; divdet.Visible = true; } else { lblmsg.Text = "No LCO Details Found"; divdet.Visible = false; Paydet.Visible = false; btnSubmit.Visible = false; } } else { lblmsg.Text = "Please select LCO"; divdet.Visible = false; Paydet.Visible = false; btnSubmit.Visible = false; lblCustNo.Text = ""; ViewState["lcocode"] = null; lblCustName.Text = ""; lblCustAddr.Text = ""; lblmobno.Text = ""; lblEmail.Text = ""; lblCurrBalance.Text = ""; } }
protected void FillLcoDetails() { lblmsg.Text = ""; string str = ""; Paydet.Visible = false; btnSubmit.Visible = false; divdet.Visible = false; pnllco.Visible = false; Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); string operator_id = ""; string category_id = ""; if (Session["operator_id"] != null && Session["category"] != null) { operator_id = Convert.ToString(Session["operator_id"]); category_id = Convert.ToString(Session["category"]); } string ConStr = ConfigurationSettings.AppSettings["ConString"].ToString().Trim(); OracleConnection conObj = new OracleConnection(ConStr); try { str = " SELECT '('||var_lcomst_code||')'||a.var_lcomst_name name,var_lcomst_code lcocode "; str += " FROM aoup_lcopre_lco_det a ,aoup_operator_def c,aoup_user_def u "; str += " WHERE a.num_lcomst_operid = c.num_oper_id and a.num_lcomst_operid=u.num_user_operid and u.var_user_username=a.var_lcomst_code "; if (category_id == "11") { str += " and c.num_oper_clust_id =" + operator_id; } else if (category_id == "3") { str += "and a.num_lcomst_operid = " + operator_id + " "; } else { lblmsg.Text = "No LCO Details Found"; Paydet.Visible = false; btnSubmit.Visible = false; divdet.Visible = false; pnllco.Visible = false; return; } DataTable tbllco = GetResult(str); if (tbllco.Rows.Count > 0) { pnllco.Visible = true; ddllco.DataTextField = "name"; ddllco.DataValueField = "lcocode"; ddllco.DataSource = tbllco; ddllco.DataBind(); if (category_id == "11") { ddllco.Items.Insert(0, new ListItem("Select LCO", "0")); } else if (category_id == "3") { ddllco_SelectedIndexChanged(null, null); } } else { lblmsg.Text = "No LCO Details Found"; divdet.Visible = false; Paydet.Visible = false; btnSubmit.Visible = false; pnllco.Visible = false; } } catch (Exception ex) { Response.Write("Error while online payment : " + ex.Message.ToString()); } finally { conObj.Close(); conObj.Dispose(); } }
protected void btnSubmit_Click(object sender, EventArgs e) { lblmsg.Text = ""; Cls_Data_Auth auth = new Cls_Data_Auth(); string Ip = auth.GetIPAddress(HttpContext.Current.Request); if (txtLCOSearch.Text.Trim() == "" || lblCustNo.Text.Trim() == "") { msgbox("Please Select LCO", txtLCOSearch); return; } else if (txtCashAmt.Text.Trim() == "") { msgbox("Please Enter Amount", txtCashAmt); return; } else if (RBPaymode.SelectedValue == "Q" && txtChqDDno.Text.Trim() == "") { msgbox("Please Enter Cheque Number", txtChqDDno); return; } else if (RBPaymode.SelectedValue == "DD" && txtChqDDno.Text.Trim() == "") { msgbox("Please Enter DD Number", txtChqDDno); return; } else if (RBPaymode.SelectedValue == "N" && txtChqDDno.Text.Trim() == "") { msgbox("Please Enter Reference Number", txtChqDDno); return; } if (RBPaymode.SelectedValue.ToString() == "Q" || RBPaymode.SelectedValue.ToString() == "DD") { if (txtFrom.Text.Trim() == "") { msgbox("Please select Cheque/DD date", txtFrom); return; } if (txtBankName.Text.Trim() == "" || txtbranchnm.Text.Trim() == "") { msgbox("Please select bank and branch", txtBankName); return; } } if (RBPaymode.SelectedValue.ToString() == "N") { if (txtBankName.Text.Trim() == "") { msgbox("Please select bank", txtBankName); return; } } btnSubmit.Visible = false; Hashtable ht = new Hashtable(); string loggedInUser; if (Session["username"] != null) { loggedInUser = Session["username"].ToString(); } else { Session.Abandon(); Response.Redirect("~/Login.aspx"); return; } ht.Add("User", loggedInUser); ht.Add("CustCode", lblCustNo.Text.Trim()); ht.Add("Amount", Convert.ToInt32(txtCashAmt.Text.Trim())); ht.Add("PayMode", RBPaymode.SelectedValue.ToString()); if (RBPaymode.SelectedValue.ToString() == "Q" || RBPaymode.SelectedValue.ToString() == "DD") { ht.Add("chequeddno", txtChqDDno.Text.Trim()); ht.Add("CheckDate", Convert.ToDateTime(txtFrom.Text.Trim())); } else if (RBPaymode.SelectedValue.ToString() == "N") { ht.Add("chequeddno", txtChqDDno.Text.Trim()); ht.Add("CheckDate", DateTime.MinValue); } else { ht.Add("chequeddno", "N/A"); ht.Add("CheckDate", DateTime.MinValue); } ht.Add("BankName", hfBankId.Value.Trim()); ht.Add("Branch", txtbranchnm.Text.Trim()); ht.Add("Remark", txtRemark.Text.Trim()); ht.Add("ReceiptNo", txtReceipt.Text.Trim()); ht.Add("IP", Ip); Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); string response = obj.LcoPayment(ht); if (response == "ex_occured") { Response.Redirect("~/ErrorPage.aspx"); return; } string[] strrnw = new string[4]; strrnw = response.Split(','); lblmsg.Text = strrnw[1]; //resetForNextTrans(); if (response.StartsWith("9999")) { Session["rcpt_pt_rcptno1"] = strrnw[2].ToString(); Session["rcpt_pt_date1"] = strrnw[3].ToString(); Session["rcpt_pt_cashiername"] = strrnw[4].ToString(); Session["rcpt_pt_address"] = strrnw[5].ToString(); Session["rcpt_pt_company"] = strrnw[6].ToString(); //Session["rcpt_pt_details"] = strrnw[7].ToString(); Session["rcpt_pt_lcocd1"] = lblCustNo.Text; Session["rcpt_pt_lconm1"] = lblCustName.Text; //Session["cashier"] = Session["name"].ToString(); /* * Str += "," + out_BASEamt.ToString(); * Str += "," + out_ET.ToString(); * Str += "," + out_ETamt.ToString(); * Str += "," + out_ST.ToString(); * Str += "," + out_STamt.ToString(); * Str += "," + out_EC.ToString(); * Str += "," + out_ECamt.ToString(); * Str += "," + out_HEC.ToString(); * Str += "," + out_HECamt.ToString(); * * Session["rcpt_pt_baseamt"] = strrnw[7].ToString(); * Session["rcpt_pt_et"] = strrnw[8].ToString(); * Session["rcpt_pt_etamt"] = strrnw[9].ToString(); * Session["rcpt_pt_st"] = strrnw[10].ToString(); * Session["rcpt_pt_stamt"] = strrnw[11].ToString(); * Session["rcpt_pt_ec"] = strrnw[12].ToString(); * Session["rcpt_pt_ecamt"] = strrnw[13].ToString(); * Session["rcpt_pt_hec"] = strrnw[14].ToString(); * Session["rcpt_pt_hecamt"] = strrnw[15].ToString(); */ Session["rcpt_pt_amt1"] = txtCashAmt.Text; Session["rcpt_pt_paymode1"] = RBPaymode.SelectedItem.ToString(); Session["rcpt_pt_cheqno1"] = txtChqDDno.Text; Session["rcpt_pt_bnknm1"] = txtBankName.Text.Trim();//hfBankId.Value.ToString(); Session["rcpt_pt_premark1"] = txtRemark.Text.Trim(); reset(); lblmsg.Text = response.Split(',')[1]; Response.Write("<script language='javascript'> window.open('../Transaction/rcptPaymentReceiptInvoice.aspx', 'Print_Receipt','HEIGHT=600,WIDTH=820,top=50,left=50,toolbar=no,scrollbars=yes,resizable=yes,location=no,status=no');</script>"); } else { lblmsg.Text = response; } }
protected void Page_Load(object sender, EventArgs e) { String TransId = ""; lblmsg.Visible = false; try { if (Request.QueryString["transid"].ToString() == "") { lblmsg.Visible = true; lblmsg.Text = "Transaction id cannot be null"; return; } } catch { lblmsg.Visible = true; lblmsg.Text = "Invalid URL"; return; } TransId = Request.QueryString["transid"].ToString(); string strCon = ConfigurationSettings.AppSettings["conString"].ToString().Trim(); OracleConnection con = new OracleConnection(strCon); try { double Amount = 0; string User = ""; string lcoCode = ""; string Remark = ""; string username = ""; string rcptno = ""; string BillDeskRef = ""; string Name = ""; try { string str = "select var_lcopay_receiptno , var_billdesk_ref_no, var_lcopay_insby username , b.var_user_userowner," + "a.num_lcopay_amount,a.var_lcopay_remark from aoup_lcopre_lco_online_pay_det a " + "inner join aoup_user_def b on a.var_lcopay_insby=b.var_user_username where trim(var_billdesk_ref_no)=trim('" + TransId + "')"; OracleCommand cmd = new OracleCommand(str, con); con.Open(); OracleDataReader dr = cmd.ExecuteReader(); if (dr.HasRows) { while (dr.Read()) { username = dr["username"].ToString(); Amount = Convert.ToDouble(dr["num_lcopay_amount"].ToString()); Remark = dr["var_lcopay_remark"].ToString(); BillDeskRef = dr["var_billdesk_ref_no"].ToString(); rcptno = dr["var_lcopay_receiptno"].ToString(); Name = dr["var_user_userowner"].ToString(); } } else { return; } } catch (Exception ex) { Response.Write(ex.Message.ToString()); } Session["rcpt_pt_rcptno1"] = rcptno; Session["rcpt_pt_rcptno2"] = BillDeskRef; Session["rcpt_pt_date1"] = DateTime.Now.ToString("dd/MM/yyyy"); Session["rcpt_pt_cashiername"] = "N/A"; Session["rcpt_pt_address"] = ""; Session["rcpt_pt_company"] = ""; Session["rcpt_pt_lcocd1"] = username; Session["rcpt_pt_lconm1"] = Name; Session["rcpt_pt_amt1"] = Amount; Session["rcpt_pt_paymode1"] = "Online"; Session["rcpt_pt_cheqno1"] = "N/A"; Session["rcpt_pt_bnknm1"] = "N/A"; Session["rcpt_pt_premark1"] = Remark.ToString(); string rcpt_no = ""; string rcpt_Online_no = ""; string date = ""; string cashier_name = ""; string address = ""; string company = ""; string lco_code = ""; string lco_name = ""; string amount = ""; string pay_mode = ""; string cheque_no = ""; string bank_name = ""; string remark = ""; string base_amt = ""; string st = ""; string st_smt = ""; string ec = ""; string ec_amt = ""; string hec = ""; string hec_amt = ""; string et = ""; string et_amt = ""; if (Session["rcpt_pt_rcptno1"] != null) { rcpt_no = Session["rcpt_pt_rcptno1"].ToString(); } if (Session["rcpt_pt_rcptno2"] != null) { rcpt_Online_no = Session["rcpt_pt_rcptno2"].ToString(); } if (Session["rcpt_pt_date1"] != null) { date = Session["rcpt_pt_date1"].ToString(); } if (Session["rcpt_pt_cashiername"] != null) { cashier_name = Session["rcpt_pt_cashiername"].ToString(); } if (Session["rcpt_pt_address"] != null) { address = Session["rcpt_pt_address"].ToString(); } if (Session["rcpt_pt_company"] != null) { company = Session["rcpt_pt_company"].ToString(); } if (Session["rcpt_pt_lcocd1"] != null) { lco_code = Session["rcpt_pt_lcocd1"].ToString(); } if (Session["rcpt_pt_lconm1"] != null) { lco_name = Session["rcpt_pt_lconm1"].ToString(); } if (Session["rcpt_pt_amt1"] != null) { amount = Session["rcpt_pt_amt1"].ToString(); } if (Session["rcpt_pt_paymode1"] != null) { pay_mode = Session["rcpt_pt_paymode1"].ToString(); } if (Session["rcpt_pt_cheqno1"] != null) { cheque_no = Session["rcpt_pt_cheqno1"].ToString(); } if (Session["rcpt_pt_bnknm1"] != null) { bank_name = Session["rcpt_pt_bnknm1"].ToString(); } if (Session["rcpt_pt_premark1"] != null) { remark = Session["rcpt_pt_premark1"].ToString(); } //if (Session["rcpt_pt_details"] != null) //{ // details = Session["rcpt_pt_details"].ToString(); //} //Session["cashier"] = Session["name"].ToString(); if (pay_mode.Trim() == "Cash") { bank_name = "N/A"; cheque_no = "N/A"; } if (pay_mode.Trim() == "Online") { tdOnline1.Visible = true; tdOnline2.Visible = true; tdOnline3.Visible = true; tdOnline4.Visible = true; tdOnline5.Visible = true; tdOnline6.Visible = true; lblonlineReceipt1.Text = rcpt_Online_no; lblonlineReceipt.Text = rcpt_Online_no; lblonlineR2.Text = rcpt_Online_no; lblonlineR1.Text = rcpt_Online_no; trOnline1.Visible = true; trOnline.Visible = true; trCash.Visible = false; trCash1.Visible = false; lblReceiptTitle.Text = "RECEIPT"; lblReceiptTitle1.Text = "RECEIPT"; lblCashier.Visible = false; lblCashierName.Visible = false; lblCashier1.Visible = false; lblCashierName2.Visible = false; } else { tdOnline1.Visible = false; tdOnline2.Visible = false; tdOnline3.Visible = false; tdOnline4.Visible = false; tdOnline5.Visible = false; tdOnline6.Visible = false; lblonlineReceipt.Text = "N/A"; lblCashierName.Visible = true; lblCashier.Visible = true; lblCashier1.Visible = true; lblCashierName2.Visible = true; lblReceiptTitle.Text = "RECEIPT cum INVOICE"; lblReceiptTitle1.Text = "RECEIPT cum INVOICE"; trOnline1.Visible = false; trCash1.Visible = true; trCash.Visible = true; } lblCompanyName.Text = company; lblCompanyName2.Text = company; lblRemark.Text = remark; lblRemark2.Text = remark; lblBankName.Text = bank_name; lblBankName2.Text = bank_name; lblChequeDDNo.Text = cheque_no; lblChequeDDNo2.Text = cheque_no; lblPaymentMode.Text = pay_mode; lblPaymentMode2.Text = pay_mode; lblAmount.Text = amount; lblAmount2.Text = amount; lblAmout2.Text = amount; //hdnAmount.Value = amount; lblAmout1.Text = amount; lblLcoCode.Text = lco_code; lblLcoCode2.Text = lco_code; lblLcoName.Text = lco_name; lblLcoName2.Text = lco_name; lblAddress.Text = address; lblAddress2.Text = address; lblCashierName.Text = cashier_name; lblCashierName2.Text = cashier_name; lblRcptDate.Text = date; lblRcptDate2.Text = date; lblRcptNo.Text = rcpt_no; lblRcptNo2.Text = rcpt_no; Cls_BLL_TransHwayLcoPayment objpan = new Cls_BLL_TransHwayLcoPayment(); string[] details = objpan.getPanDetails(username, company); if (details != null) { try { lblCIN.Text = details[0]; lblCIN2.Text = details[0]; lblPAN.Text = details[1]; lblPAN2.Text = details[1]; lblSTNO.Text = details[2]; lblSTNO2.Text = details[2]; lblCompanyName.Text = details[3]; lblCompanyName2.Text = details[3]; address = details[3]; lblAddress12.Text = address; lblAddress13.Text = address; lblAddress22.Text = address; lblAddress23.Text = address; } catch (Exception ex) { } } Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); string[] tax_det = obj.getTaxDetails(username, rcpt_no); base_amt = tax_det[8]; st = tax_det[2]; st_smt = tax_det[3]; ec = tax_det[4]; ec_amt = tax_det[5]; hec = tax_det[6]; hec_amt = tax_det[7]; et = tax_det[0]; et_amt = tax_det[1]; lblBaseAmt.Text = base_amt; lblBaseAmt2.Text = base_amt; lblST.Text = (Convert.ToDouble(st) * 100).ToString(); lblST2.Text = (Convert.ToDouble(st) * 100).ToString(); lblSTAmt.Text = st_smt; lblSTAmt2.Text = st_smt; lblHEC.Text = (Convert.ToDouble(hec) * 100).ToString(); lblHEC2.Text = (Convert.ToDouble(hec) * 100).ToString(); lblHECAmt.Text = hec_amt; lblHECAmt2.Text = hec_amt; lblEC.Text = (Convert.ToDouble(ec) * 100).ToString(); lblEC2.Text = (Convert.ToDouble(ec) * 100).ToString(); lblECAmt.Text = ec_amt; lblECAmt2.Text = ec_amt; lblET.Text = (Convert.ToDouble(et) * 100).ToString(); lblET2.Text = (Convert.ToDouble(et) * 100).ToString(); lblETAmt.Text = et_amt; lblETAmt2.Text = et_amt; if (et == "0") { tr1.Visible = false; trET.Visible = false; } else { tr1.Visible = true; trET.Visible = true; } } catch (Exception ex) { Response.Write(ex.Message.ToString()); } Pnltopdf(); }
protected string CallPaymentProc(int TransId, int UbilldeskOrderNo, string BillDeskRef, int BillDeskAuthoStatus, string BillDeskAuthoMessage, string Indentifier) { //string strCon = ConfigurationSettings.AppSettings["conString"].ToString().Trim(); //OracleConnection con = new OracleConnection(strCon); //Cls_Data_Auth auth = new Cls_Data_Auth(); //string Ip = auth.GetIPAddress(HttpContext.Current.Request); Hashtable ht = new Hashtable(); string strrespo = ""; //try //{ // string str = "select * from aoup_lcopre_lco_online_pay_det where trim(num_lcopay_transid)=trim("+intorderid+")"; // OracleCommand cmd = new OracleCommand(str, con); // con.Open(); // OracleDataReader dr = cmd.ExecuteReader(); // if (dr.HasRows) // { // while (dr.Read()) // { // ht.Add("User", dr["var_lcopay_insby"].ToString()); // ht.Add("CustCode", dr["var_lcopay_lcocode"].ToString()); // ht.Add("Amount", Convert.ToInt32(dr["num_lcopay_amount"].ToString())); // ht.Add("PayMode", dr["var_lcopay_paymode"].ToString()); // ht.Add("chequeddno", dr["var_lcopay_chqddno"].ToString()); // ht.Add("CheckDate", dr["dat_lcopay_chequedt"].ToString()); // ht.Add("BankName", dr["var_lcopay_bank"].ToString()); // ht.Add("Branch", dr["var_lcopay_branch"].ToString()); // ht.Add("Remark", dr["var_lcopay_remark"].ToString()); // ht.Add("ReceiptNo", dr["var_lcopay_erpreceiptno"].ToString()); // ht.Add("IP", Ip); // } // } // else // { // ListItem lst = new ListItem(); // lst.Text = "No Record Found "; // lst.Value = "0"; // return lst.Text; // } try { ht.Add("TransId", TransId); ht.Add("UbilldeskOrderNo", UbilldeskOrderNo); ht.Add("BillDeskRef", BillDeskRef); ht.Add("BillDeskAuthoStatus", BillDeskAuthoStatus); ht.Add("BillDeskAuthoMessage", BillDeskAuthoMessage); ht.Add("Indentifier", Indentifier); ViewState["BillDeskRef"] = BillDeskRef; Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); string response = obj.InventryOnlinPayment(ht); if (response == "ex_occured") { strrespo = "Transaction successfully from bill desk ,But Upass In failed"; } else { strrespo = response; } } catch (Exception ex) { Response.Write(ex.Message.ToString()); } return(strrespo); }
protected void btnSearch_Click(object sender, EventArgs e) { if (rbtnsearch.SelectedValue.ToString() == "1") { if (ddlBankName.SelectedIndex == 0) { msgbox("Please Select Bank Name", ddlBankName); return; } } if (txtLCOSearch.Text.Trim() != "") { string customerId = Request.Form[hfCustomerId.UniqueID]; string customerName = Request.Form[txtLCOSearch.UniqueID]; Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); // string[] responseStr = obj.getLcodetails(username, txtLCOSearch.Text.Trim(), RadSearchby.SelectedValue, operid); string loggedInUser = ""; string operator_id = ""; string search_type = ""; if (Session["username"] != null && Session["operator_id"] != null) { loggedInUser = Session["username"].ToString(); operator_id = Session["operator_id"].ToString(); } if (rbtnsearch.SelectedValue == "0") { search_type = "0"; } else { search_type = "1"; } string[] responceStr = obj.GetLcopaymentDetails(loggedInUser, txtLCOSearch.Text.Trim(), catid, operator_id, search_type, ddlBankName.SelectedValue.ToString()); if (responceStr.Length != 0) { lblLcoCode.Text = responceStr[0].Trim(); lblLcoName.Text = responceStr[1].Trim(); lblLcoAddr.Text = responceStr[2].Trim(); lblLcoMobno.Text = responceStr[3].Trim(); lblLcoEmail.Text = responceStr[4].Trim(); lblLcoAmt.Text = responceStr[5].Trim(); lblLcoPaymode.Text = (responceStr[6].Trim() == "C") ? "Cash" : ((responceStr[6].Trim() == "Q") ? "Cheque" : ((responceStr[6].Trim() == "DD") ? "Demand Draft" : ((responceStr[6].Trim() == "N") ? "NEFT" : ""))); lblLcoBank.Text = responceStr[7].Trim(); lblLcoBranch.Text = responceStr[8].Trim(); lblChequeNo.Text = responceStr[9].Trim(); lblChequeDate.Text = responceStr[10].Trim(); ViewState["ReceiptNo"] = responceStr[11].Trim(); DataSet ds = Cls_Helper.Comboupdate("aoup_reasons_def", "num_reason_id", "var_reason_name"); ddlReason.DataSource = ds; ddlReason.DataTextField = "var_reason_name"; ddlReason.DataValueField = "num_reason_id"; ddlReason.DataBind(); ds.Dispose(); ddlReason.Items.Insert(0, "Select Reason"); divdet.Visible = true; DetailsAccordion.SelectedIndex = -1; } else { if (rbtnsearch.SelectedValue.ToString() == "0") { msgbox("Invalid Receipt", txtLCOSearch); return; } else { msgbox("Invalid Cheque/DD No.", txtLCOSearch); return; } } } else { if (rbtnsearch.SelectedValue.ToString() == "0") { msgbox("Please Enter Receipt No.", txtLCOSearch); return; } else if (rbtnsearch.SelectedValue.ToString() == "1") { msgbox("Please Enter Cheque No.", txtLCOSearch); return; } } }
protected void Page_Load(object sender, EventArgs e) { string rcpt_no = ""; string rcpt_Online_no = ""; string date = ""; string cashier_name = ""; string lcoaddress = ""; string branchsddress = ""; string company = ""; string lco_code = ""; string lco_name = ""; string amount = ""; string pay_mode = ""; string cheque_no = ""; string bank_name = ""; string remark = ""; string username = ""; string base_amt = ""; string st = ""; string st_smt = ""; string ec = ""; string ec_amt = ""; string hec = ""; string hec_amt = ""; string et = ""; string et_amt = ""; String useraddress = ""; if (Session["username"] != null && Session["username"] != "") { username = Session["username"].ToString(); } else { Session.Abandon(); Response.Redirect("~/Login.aspx"); } if (Session["rcpt_pt_receiptno"] == null || Session["rcpt_pt_datetime"] == null || Session["rcpt_pt_Lcocode"] == null || Session["rcpt_pt_Amount"] == null) { if (Session["rcpt_pt_Paymentmode"] != null) { if (Session["rcpt_pt_Paymentmode"].ToString() == "Online") { Response.Redirect("~/Transaction/TransHwayOnlinePayResponse.aspx"); } else { Response.Redirect("~/Transaction/TransHwayLcoPayment.aspx"); } } } if (Session["data"] != null) { lblData.Text = Session["data"].ToString(); Session["data"] = null; } if (Session["rcpt_pt_receiptno"] != null) { rcpt_no = Session["rcpt_pt_receiptno"].ToString(); } if (Session["rcpt_pt_receiptonlineno"] != null) { rcpt_Online_no = Session["rcpt_pt_receiptonlineno"].ToString(); } if (Session["rcpt_pt_datetime"] != null) { date = Session["rcpt_pt_datetime"].ToString(); } if (Session["rcpt_pt_cashiername"] != null) { cashier_name = Session["rcpt_pt_cashiername"].ToString(); } if (Session["rcpt_pt_address"] != null) { useraddress = Session["rcpt_pt_address"].ToString(); } if (Session["rcpt_pt_company"] != null) { company = Session["rcpt_pt_company"].ToString(); } if (Session["rcpt_pt_Lcocode"] != null) { lco_code = Session["rcpt_pt_Lcocode"].ToString(); } if (Session["rcpt_pt_Lconame"] != null) { lco_name = Session["rcpt_pt_Lconame"].ToString(); } if (Session["rcpt_pt_Amount"] != null) { amount = Session["rcpt_pt_Amount"].ToString(); } if (Session["rcpt_pt_Paymentmode"] != null) { pay_mode = Session["rcpt_pt_Paymentmode"].ToString(); } if (Session["rcpt_pt_ChequeNo"] != null) { cheque_no = Session["rcpt_pt_ChequeNo"].ToString(); } if (Session["rcpt_pt_Bankname"] != null) { bank_name = Session["rcpt_pt_Bankname"].ToString(); } if (Session["rcpt_pt_premark1"] != null) { remark = Session["rcpt_pt_premark1"].ToString(); } //if (Session["rcpt_pt_details"] != null) //{ // details = Session["rcpt_pt_details"].ToString(); //} //Session["cashier"] = Session["name"].ToString(); /* * Session["rcpt_rr"] * Session["rcpt_auth"] * Session["rcpt_mpos"] */ //if (Session["rcpt_rr"] != null) //{ // if (pay_mode.Trim() == "MPOS") // { // lblrr1.Text = Session["rcpt_rr"].ToString(); // lblrr2.Text = Session["rcpt_rr"].ToString(); // lblauth1.Text = Session["rcpt_auth"].ToString(); // lblAuth2.Text = Session["rcpt_auth"].ToString(); // lblmpos1.Text = Session["rcpt_mpos"].ToString(); // lblmpos2.Text = Session["rcpt_mpos"].ToString(); // TRmpos21.Visible = true; // TRmpos22.Visible = true; // TRmpos24.Visible = true; // TRmpos23.Visible = true; // TRmpos11.Visible = true; // TRmpos12.Visible = true; // TRmpos13.Visible = true; // TRmpos14.Visible = true; // } //} if (pay_mode.Trim() == "Cash") { bank_name = "N/A"; cheque_no = "N/A"; } if (pay_mode.Trim() == "Online") { lblOnlinereceipt2.Text = "Online Receipt No."; lblOnlinereceipt5.Text = "Online Receipt No."; tdOnline1.Visible = true; tdOnline2.Visible = true; tdOnline3.Visible = true; tdOnline4.Visible = true; tdOnline5.Visible = true; tdOnline6.Visible = true; lblonlineReceipt1.Text = rcpt_Online_no; lblonlineReceipt.Text = rcpt_Online_no; lblonlineR2.Text = rcpt_Online_no; lblonlineR1.Text = rcpt_Online_no; trOnline1.Visible = true; trOnline.Visible = true; trCash.Visible = false; trCash1.Visible = false; lblReceiptTitle.Text = "DUPLICATE RECEIPT"; lblSignature.Visible = false; lblSignature1.Visible = false; lblReceiptTitle1.Text = "DUPLICATE RECEIPT"; lblCashier.Visible = false; lblCashierName.Visible = false; lblCashier1.Visible = false; lblCashierName2.Visible = false; } else { lblOnlinereceipt2.Text = "Cheque No."; lblOnlinereceipt5.Text = "Cheque No."; lblonlineR1.Text = cheque_no; lblonlineR2.Text = cheque_no; lblSignature.Visible = true; lblSignature1.Visible = true; tdOnline1.Visible = false; tdOnline2.Visible = false; tdOnline3.Visible = false; tdOnline4.Visible = false; tdOnline5.Visible = false; tdOnline6.Visible = false; lblonlineReceipt.Text = "N/A"; lblCashierName.Visible = true; lblCashier.Visible = true; lblCashier1.Visible = true; lblCashierName2.Visible = true; lblReceiptTitle.Text = "DUPLICATE RECEIPT"; lblReceiptTitle1.Text = "DUPLICATE RECEIPT"; trOnline1.Visible = true; trOnline.Visible = true; trCash.Visible = false; trCash1.Visible = false; } lblCompanyName.Text = company; lblCompanyName2.Text = company; lblRemark.Text = remark; lblRemark2.Text = remark; lblBankName.Text = bank_name; lblBankName2.Text = bank_name; lblBankName4.Text = bank_name; lblBankName3.Text = bank_name; lblChequeDDNo.Text = cheque_no; lblChequeDDNo2.Text = cheque_no; lblonlineR1.Text = cheque_no; lblonlineR2.Text = cheque_no; lblPaymentMode.Text = pay_mode; lblPaymentMode2.Text = pay_mode; lblPaymentMode4.Text = pay_mode; lblPaymentMode3.Text = pay_mode; lblAmount.Text = amount; lblAmount2.Text = amount; lblAmout2.Text = amount; hdnAmount.Value = amount; lblAmout1.Text = amount; lblLcoCode.Text = lco_code; lblLcoCode2.Text = lco_code; lblLcoName.Text = lco_name; lblLcoName2.Text = lco_name; lblAddress.Text = branchsddress; lblAddress2.Text = branchsddress; lblCashierName.Text = cashier_name; lblCashierName2.Text = cashier_name; lblRcptDate.Text = date; lblRcptDate2.Text = date; lblRcptNo.Text = rcpt_no; lblRcptNo2.Text = rcpt_no; if (pay_mode.Trim() == "MPOS") { lblOnlinereceipt2.Text = "R.R No."; lblOnlinereceipt5.Text = "R.R No."; lblonlineR1.Text = Session["rcpt_rr"].ToString(); lblonlineR2.Text = Session["rcpt_rr"].ToString(); bank_name = "N/A"; } Cls_BLL_TransHwayLcoPayment objpan = new Cls_BLL_TransHwayLcoPayment(); string[] details = objpan.getPanDetails(Session["rcpt_pt_Lcocode"].ToString(), company); if (details != null) { try { lblCIN.Text = details[0]; lblCIN2.Text = details[0]; lblPAN.Text = details[1]; lblPAN2.Text = details[1]; lblSTNO.Text = details[2]; lblSTNO2.Text = details[2]; lblCompanyName.Text = details[3]; lblCompanyName2.Text = details[3]; lcoaddress = details[4]; branchsddress = details[5]; lblAddress12.Text = details[6]; lblAddress13.Text = lcoaddress; lblAddress22.Text = details[6]; lblAddress23.Text = lcoaddress; lblAddress.Text = branchsddress; lblAddress2.Text = branchsddress; } catch (Exception ex) { } } //Cls_BLL_TransHwayLcoPayment obj = new Cls_BLL_TransHwayLcoPayment(); //string[] tax_det = obj.getTaxDetails(username, rcpt_no); //base_amt = tax_det[8]; //st = tax_det[2]; //st_smt = tax_det[3]; //ec = tax_det[4]; //ec_amt = tax_det[5]; //hec = tax_det[6]; //hec_amt = tax_det[7]; //et = tax_det[0]; //et_amt = tax_det[1]; //lblBaseAmt.Text = base_amt; //lblBaseAmt2.Text = base_amt; //lblST.Text = (Convert.ToDouble(st) * 100).ToString(); //lblST2.Text = (Convert.ToDouble(st) * 100).ToString(); //lblSTAmt.Text = st_smt; //lblSTAmt2.Text = st_smt; //lblHEC.Text = (Convert.ToDouble(hec) * 100).ToString(); //lblHEC2.Text = (Convert.ToDouble(hec) * 100).ToString(); //lblHECAmt.Text = hec_amt; //lblHECAmt2.Text = hec_amt; //lblEC.Text = (Convert.ToDouble(ec) * 100).ToString(); //lblEC2.Text = (Convert.ToDouble(ec) * 100).ToString(); //lblECAmt.Text = ec_amt; //lblECAmt2.Text = ec_amt; //lblET.Text = (Convert.ToDouble(et) * 100).ToString(); //lblET2.Text = (Convert.ToDouble(et) * 100).ToString(); //lblETAmt.Text = et_amt; //lblETAmt2.Text = et_amt; //if (et == "0") //{ // tr1.Visible = false; // trET.Visible = false; //} //else //{ // tr1.Visible = true; // trET.Visible = true; //} }