Ejemplo n.º 1
0
        protected void btnreset_Click(object sender, EventArgs e)
        {
            btnreset.Enabled = false;
            if (txtname.Text.Trim() == "")
            {
                msgbox("Please Enter UserName", txtname);
                return;
            }
            Cls_Data_Auth auth = new Cls_Data_Auth();
            string        Ip   = auth.GetIPAddress(HttpContext.Current.Request);

            Hashtable ht = new Hashtable();

            ht.Add("UserName", txtname.Text.Trim());
            ht.Add("IP", Ip);
            Cls_Bussiness_forgotpass objbuss = new Cls_Bussiness_forgotpass();
            string response = objbuss.ForgotDetails(ht);

            if (response == "ex_occured")
            {
                Response.Redirect("~/ErrorPage.aspx");
                return;
            }
            lblmsg.Visible = true;
            // lblmsg.Text = response;
            Session["txt"]   = response;
            lblmsg.Text      = Session["txt"].ToString();
            btnreset.Enabled = true;
            // txtname.Text = "";
            ModalPopupExtender1.Show();
        }
Ejemplo n.º 2
0
        //---- Added By RP on 28.06.2017
        public void GetGSTNo(string LCOCODE, out string GSTNO)
        {
            GSTNO = "";
            Cls_Data_Auth obj = new Cls_Data_Auth();

            obj.GetGSTNo(LCOCODE, out GSTNO);
        }
Ejemplo n.º 3
0
        protected void btnAccept_Click(object sender, EventArgs e)
        {
            Cls_Data_Auth auth = new Cls_Data_Auth();
            string        Ip   = auth.GetIPAddress(HttpContext.Current.Request);

            try
            {
                Cls_Business_Auth objAuth     = new Cls_Business_Auth();
                string            result      = objAuth.InsertLCAccept(txtUsername.Text, Ip);
                string[]          Getresponse = result.Split('$');
                if (Getresponse[0] == "9999")
                {
                    Response.Redirect("~/Transaction/Home.aspx", true);
                    lblmsg.Text = "";
                }
                else
                {
                    // msgboxstr(Getresponse[1].ToString());
                }
            }
            catch (Exception ex)
            {
                lblmsg.Text = "Error Occured.Try Again !";
                //throw;
            }
        }
Ejemplo n.º 4
0
        public void GetAccepGST(string LCOCODE, out string lconame)
        {
            lconame = "";
            Cls_Data_Auth obj = new Cls_Data_Auth();

            obj.GetAccepGST(LCOCODE, out lconame);
        }
Ejemplo n.º 5
0
        public DataTable GetLCODetails(string username)
        {
            Cls_Data_Auth objAuth    = new Cls_Data_Auth();
            Hashtable     htResponse = new Hashtable();

            return(objAuth.GetLCODetails(username));
        }
Ejemplo n.º 6
0
        protected void btncnfmBlck_Click(object sender, EventArgs e)
        {
            try
            {
                if (ckOld.Checked == false && ckNew.Checked == false)
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "alertMessage", " alert('Please Select Any One Mobile No');", true);
                    //popMsgBox.Show();
                    return;
                }
                else
                {
                    Cls_Data_Auth obj      = new Cls_Data_Auth();
                    string        strNewNO = "";
                    if (ckNew.Checked == true)
                    {
                        if (txtNewContactNo.Text != "")
                        {
                            if (txtNewContactNo.Text.Length != 10)
                            {
                                ScriptManager.RegisterStartupScript(this, this.GetType(), "alertMessage", " alert('Please Enter Mobile No should be 10 digits');", true);
                                popMsgBox.Show();
                                return;
                            }
                            string strMobileNo = txtNewContactNo.Text.Substring(0, 1);
                            if (!(strMobileNo == "9" || strMobileNo == "8" || strMobileNo == "7" || strMobileNo == "6"))
                            {
                                ScriptManager.RegisterStartupScript(this, this.GetType(), "alertMessage", "alert('Please Enter valid Mobile No');", true);
                                popMsgBox.Show();
                                return;
                            }
                        }
                        else
                        {
                            ScriptManager.RegisterStartupScript(this, this.GetType(), "alertMessage", " alert('Please Enter Other Mobile No');", true);
                            popMsgBox.Show();
                            return;
                        }
                        strNewNO = txtNewContactNo.Text;
                    }
                    else
                    {
                        strNewNO = "";
                    }

                    string   strresponse  = obj.SendAndroidUrl(Convert.ToString(Session["username"]), strNewNO);
                    string[] spliresponse = strresponse.Split('$');
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "alertMessage", "alert(\"" + spliresponse[1] + "\");", true);
                }
            }
            catch (Exception)
            {
            }
        }
        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;
        }
Ejemplo n.º 8
0
        protected void btncnfmBlck_Click(object sender, EventArgs e)
        {
            if (Session["username"] != null && Session["operator_id"] != null && Session["category"] != null && Session["user_id"] != null)
            {
                username    = Convert.ToString(Session["username"]);
                operator_id = Convert.ToString(Session["operator_id"]);
                category_id = Convert.ToString(Session["category"]);
                user_id     = Convert.ToString(Session["user_id"]);
            }
            else
            {
                Response.Redirect("~/Login.aspx");
            }



            Cls_Data_Auth ob = new Cls_Data_Auth();
            string        ip = ob.GetIPAddress(HttpContext.Current.Request);

            Hashtable htdata = new Hashtable();

            htdata.Add("userid", lblpopuserid.Text.Trim());
            htdata.Add("username", lblpopusername.Text.Trim());
            htdata.Add("ip", ip);
            htdata.Add("status", hdnpopstatus.Value);

            Cls_Bussiness_TransHwayUserCreditLimit objct = new Cls_Bussiness_TransHwayUserCreditLimit();

            string result = objct.userblkUnblock(username, htdata);

            if (result == "9999")
            {
                lblResponse.Text = "Updated Successfully";
                //blcked successfully ;
            }
            else
            {
                lblResponse.Text = "failed while updating";
                return;
            }

            if (category_id == "3")
            {
                updateBalGrid();
            }
        }
Ejemplo n.º 9
0
 protected void imgAndroid_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         Cls_Data_Auth obj        = new Cls_Data_Auth();
         string        strContact = obj.LCOContactNo(Convert.ToString(Session["username"]));
         txtLCOExist.Text = strContact;
         popMsgBox.Show();
         ckOld.Checked           = true;
         txtLCOExist.Visible     = true;
         ckNew.Checked           = false;
         txtNewContactNo.Visible = false;
     }
     catch (Exception ex)
     {
     }
 }
Ejemplo n.º 10
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            Cls_Data_Auth auth = new Cls_Data_Auth();
            string        Ip   = auth.GetIPAddress(HttpContext.Current.Request);

            if (txtNewLimit.Text.Trim() == "")
            {
                msgbox("Please Enter Amount", txtNewLimit);
                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("UserName", username);
            ht.Add("LcoId", operid);
            ht.Add("UserId", lblUserId.Text);
            ht.Add("Amount", Convert.ToInt32(txtNewLimit.Text.Trim()));
            ht.Add("Flag", "A");
            ht.Add("Remark", "");
            ht.Add("IP", Ip);
            Cls_Bussiness_TransHwayUserCreditLimit obj = new Cls_Bussiness_TransHwayUserCreditLimit();
            string response = obj.UserLimitRev(ht);

            reset();
            if (response == "ex_occured")
            {
                Response.Redirect("~/ErrorPage.aspx");
                return;
            }
            lblmsg.Text = response;
        }
Ejemplo n.º 11
0
        public string getbroadcastmesg()
        {
            Cls_Data_Auth objAuth = new Cls_Data_Auth();

            return(objAuth.getbroadcastmsg());
        }
Ejemplo n.º 12
0
        public string SessionLog(Hashtable credentials)
        {
            Cls_Data_Auth objAuth = new Cls_Data_Auth();

            return(objAuth.SessionLog(credentials));
        }
Ejemplo n.º 13
0
        protected void btnManageCredits_Click(object sender, EventArgs e)
        {
            if (category_id == "11")
            {
                operator_id = ddlLco.SelectedValue.Split('#')[0].ToString();
            }


            double        inc_cr        = 0;
            double        dec_cr        = 0;
            double        total_cr      = 0;
            double        avail_bal     = 0;
            string        strCreditInfo = "";
            Cls_Data_Auth auth          = new Cls_Data_Auth();
            string        Ip            = auth.GetIPAddress(HttpContext.Current.Request);

            foreach (GridViewRow row in grdUsers.Rows)
            {
                TextBox     txtInc        = (TextBox)row.FindControl("txtIncLimit");
                TextBox     txtDec        = (TextBox)row.FindControl("txtDecLimit");
                double      avail_usr_bal = Convert.ToDouble(row.Cells[2].Text.Trim());
                HiddenField hdnUserId     = (HiddenField)row.FindControl("hdnUserId");
                if (txtInc.Text.Trim() != "0" || txtDec.Text.Trim() != "0")
                {
                    if (txtDec.Text.Trim() != "0")
                    { //check decrease value < avail bal
                        if (avail_usr_bal < Convert.ToDouble(txtDec.Text.Trim()))
                        {
                            lblResponse.Text = "Decrease value must be less than allocated balance";
                            txtDec.Focus();
                            return;
                        }
                    }
                    strCreditInfo += hdnUserId.Value + "$" + txtInc.Text + "$" + txtDec.Text + "~";
                    if (txtInc.Text.Trim() != "0")
                    {
                        inc_cr = inc_cr + Convert.ToDouble(txtInc.Text.Trim());
                    }
                    if (txtDec.Text.Trim() != "0")
                    {
                        dec_cr = dec_cr + Convert.ToDouble(txtDec.Text.Trim());
                    }
                }
            }
            strCreditInfo = strCreditInfo.TrimEnd('~');
            total_cr      = inc_cr - dec_cr;
            avail_bal     = Convert.ToDouble(hdnAvailBal.Value);// -Convert.ToDouble(hdnAvailCreditBal.Value);// hdnAvailCreditBal is New Credit Balance

            if (avail_bal < total_cr)
            {
                lblResponse.Text = "You dont have enough balance for distribution";
                return;
            }
            else
            {
                if (strCreditInfo == "")
                {
                    lblResponse.Text = "Set balance for atleast one user";
                    return;
                }
                Cls_Bussiness_TransHwayUserCreditLimit crd = new Cls_Bussiness_TransHwayUserCreditLimit();
                string creditRes = crd.setCredits(username, strCreditInfo, operator_id, Ip);

                if (creditRes.Split('$')[0] != "9999")
                {
                    lblResponse.Text = "Setting balance failed : " + creditRes.Split('$')[1];
                    return;
                }
                else
                {
                    lblResponse.Text = creditRes.Split('$')[1];
                    updateBalGrid();
                    return;
                }
            }
        }
Ejemplo n.º 14
0
        public string InsertLCAccept(string LcoCode, string IPAdd)
        {
            Cls_Data_Auth obj = new Cls_Data_Auth();

            return(obj.InsertLCAccept(LcoCode, IPAdd));
        }
Ejemplo n.º 15
0
        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;
            }
        }
Ejemplo n.º 16
0
        protected void ibtLogIn_Click(object sender, ImageClickEventArgs e)
        {
            //if (Session["captcha"].ToString() == txtcaptcha.Text.Trim())
            //{

            //}
            //else
            //{
            //    Response.Write("<script>alert('Please provide Proper Captcha');</script>");
            //    return;
            //}
            string blusername = SecurityValidation.chkData("T", txtUsername.Text + "" + txtPassword.Text);

            if (blusername.Length > 0)
            {
                Response.Write("<script>alert('Incorrect values entered');</script>");
                return;
            }
            Cls_Data_Auth auth        = new Cls_Data_Auth();
            string        Ip          = auth.GetIPAddress(HttpContext.Current.Request);
            Hashtable     credentials = new Hashtable();

            credentials["username"] = txtUsername.Text;
            credentials["password"] = txtPassword.Text;
            credentials["IP"]       = Ip;

            Cls_Business_Auth objAuth      = new Cls_Business_Auth();
            Hashtable         authResponse = objAuth.GetAuthResponse(credentials);

            if (authResponse["ex_ocuured"] == null)
            {
                int    responseFlag = Convert.ToInt32(authResponse["response_code"]);
                string responseMsg  = authResponse["response_msg"].ToString();
                if (responseFlag == 9999)
                {
                    Session["user_id"]      = authResponse["user_id"];
                    Session["user_brmpoid"] = authResponse["user_brmpoid"];
                    Session["username"]     = txtUsername.Text;
                    Session["operator_id"]  = authResponse["operator_id"];
                    Session["category"]     = authResponse["user_operator_category"];
                    Session["name"]         = authResponse["user_name"];
                    Session["last_login"]   = authResponse["last_login"];
                    Session["login_flag"]   = authResponse["login_flag"];
                    Session["showimage"]    = "Y";
                    Session["MIAflag"]      = authResponse["MIAflag"];
                    string oddeven = "";
                    try
                    {
                        oddeven = CreateAlphaNeumericTransferCode();
                        Session["RPAuthToken"] = Convert.ToString(oddeven);
                        // now create a new cookie with this guid value
                        Response.Cookies.Add(new HttpCookie("AuthToken", Convert.ToString(oddeven)));
                    }
                    catch { }

                    //var url = "http://localhost:16218/Transaction/Home.aspx";


                    try
                    {
                        Hashtable sessionlog = new Hashtable();
                        sessionlog["username"]  = Session["username"];
                        sessionlog["sessionid"] = Session.SessionID;
                        sessionlog["pagename"]  = "Login.aspx";
                        sessionlog["name"]      = Session["name"];
                        sessionlog["IP"]        = Ip;

                        string resssion = objAuth.SessionLog(sessionlog);
                    }
                    catch { }


                    String GSTNO = "";
                    objAuth.GetGSTNo(Session["operator_id"].ToString(), out GSTNO);

                    if (GSTNO != "")
                    {
                        lblLoginResult.Text = "User login successful";
                        //if (authResponse["user_operator_category"].ToString() == "3")
                        //{
                        //    //if Logged in user is LCO
                        //    Response.Redirect("~/Reports/rptLCOAllDetails.aspx");
                        //}
                        //else
                        //{
                        if (authResponse["user_operator_category"].ToString() == "3" || authResponse["user_operator_category"].ToString() == "11")
                        {
                            NameValueCollection collections = new NameValueCollection();
                            collections.Add("username", txtUsername.Text.Trim());
                            collections.Add("Name", authResponse["user_name"].ToString());
                            //string remoteUrl = "https://hathwayconnectuat.com/Transaction/Home.aspx"; //-- UAT
                            //string remoteUrl = "http://localhost:2388/Transaction/Home.aspx";//--- LOCAL
                            string remoteUrl = "http://local.hathway.com/Transaction/Home.aspx";//--- LOCAL
                            string html      = "<html><head>";
                            html += "</head><body onload='document.forms[0].submit()'>";
                            html += string.Format("<form name='PostForm' method='POST' action='{0}'>", remoteUrl);
                            foreach (string key in collections.Keys)
                            {
                                html += string.Format("<input name='{0}' type='hidden' value='{1}'>", key, collections[key]);
                            }
                            html += "</form></body></html>";
                            Response.Clear();
                            Response.ContentEncoding = Encoding.GetEncoding("ISO-8859-1");
                            Response.HeaderEncoding  = Encoding.GetEncoding("ISO-8859-1");
                            Response.Charset         = "ISO-8859-1";
                            Response.Write(html);
                            Response.End();
                            Response.Redirect("~/Transaction/Home.aspx", true);//for lco
                        }
                        else
                        {
                            string script = "<script language=\"javascript\" type=\"text/javascript\">alert('You Are Not Authorised to Login in this Portal.');</script>";
                            Response.Write(script);
                        }
                    }
                    else
                    {
                        String AccepLCOCOde = "";
                        objAuth.GetAccepGST(txtUsername.Text, out AccepLCOCOde);
                        if (AccepLCOCOde == "")
                        {
                            DateTime      DT         = DateTime.Today;
                            string        CURDATE    = DT.ToString("dd-MMM-yyyy");
                            Cls_Data_Auth objTran    = new Cls_Data_Auth();
                            DataTable     htResponse = objTran.GetLCODetails(txtUsername.Text);

                            if (htResponse.Rows.Count > 0)
                            {
                                if (htResponse.Rows[0]["var_compconfig_localaddress"].ToString() != "")
                                {
                                    userGST._lblCompanyAddress = htResponse.Rows[0]["var_compconfig_localaddress"].ToString();
                                }
                                if (htResponse.Rows[0]["var_lcomst_company"].ToString() != "")
                                {
                                    userGST._lblCompanyName = htResponse.Rows[0]["var_lcomst_company"].ToString();
                                }
                                if (htResponse.Rows[0]["var_lcomst_code"].ToString() != "")
                                {
                                    userGST._lblLCOCode = htResponse.Rows[0]["var_lcomst_code"].ToString();
                                }
                                if (htResponse.Rows[0]["var_lcomst_name"].ToString() != "")
                                {
                                    userGST._lblLCOName = htResponse.Rows[0]["var_lcomst_name"].ToString();
                                }
                                if (htResponse.Rows[0]["var_lcomst_name"].ToString() != "")
                                {
                                    userGST._lblLCONameHead = htResponse.Rows[0]["var_lcomst_name"].ToString();
                                }

                                userGST._lblSYSDATE     = CURDATE;
                                userGST._lblSYSDATETIME = DT.ToString();
                            }
                            popMsg.Show();
                            //else
                            //{
                            //}
                        }
                        else
                        {
                            if (authResponse["user_operator_category"].ToString() == "3" || authResponse["user_operator_category"].ToString() == "11")
                            {
                                NameValueCollection collections = new NameValueCollection();
                                collections.Add("username", txtUsername.Text.Trim());
                                collections.Add("Name", authResponse["user_name"].ToString());
                                string remoteUrl = "http://local.hathway.com/Transaction/Home.aspx";//--- LOCAL
                                //string remoteUrl = "http://localhost:2388/Transaction/Home.aspx"; //-- LOCAL
                                //string remoteUrl = "https://hathwayconnectuat.com/Transaction/Home.aspx";// UAT
                                string html = "<html><head>";
                                html += "</head><body onload='document.forms[0].submit()'>";
                                html += string.Format("<form name='PostForm' method='POST' action='{0}'>", remoteUrl);
                                foreach (string key in collections.Keys)
                                {
                                    html += string.Format("<input name='{0}' type='hidden' value='{1}'>", key, collections[key]);
                                }
                                html += "</form></body></html>";
                                Response.Clear();
                                Response.ContentEncoding = Encoding.GetEncoding("ISO-8859-1");
                                Response.HeaderEncoding  = Encoding.GetEncoding("ISO-8859-1");
                                Response.Charset         = "ISO-8859-1";
                                Response.Write(html);
                                Response.End();
                                Response.Redirect("Transaction/frmAssignPlan.aspx");//"~/Transaction/Home.aspx", true);//for lco
                            }
                            else
                            {
                                string script = "<script language=\"javascript\" type=\"text/javascript\">alert('You Are Not Authorised to Login in this Portal.');</script>";
                                Response.Write(script);
                            }
                        }
                    }
                }
                else
                {
                    txtUsername.Text = "";
                    txtPassword.Text = "";
                    txtUsername.Focus();
                    string script = "<script language=\"javascript\" type=\"text/javascript\">alert('" + responseMsg + "');</script>";
                    Response.Write(script);
                }
            }
            else
            {
                Response.Redirect("~/ErrorPage.aspx");
            }
        }
Ejemplo n.º 17
0
        public Hashtable GetAuthResponse(Hashtable credentials)
        {
            Cls_Data_Auth objAuth = new Cls_Data_Auth();

            return(objAuth.Authentication(credentials));
        }
Ejemplo n.º 18
0
        public bool hasPageRights(string uid, string uname, string page)
        {
            Cls_Data_Auth obj = new Cls_Data_Auth();

            return(obj.checkRights(uid, uname, page));
        }
Ejemplo n.º 19
0
        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"]));
                    }
                }
            }
        }
Ejemplo n.º 20
0
        protected void btnsubmimCon_Click(object sender, EventArgs e)
        {
            //if (btnsubmit.Text == "Yes")
            //{
            Session["lblmsg"] = null;
            Cls_Data_Auth auth = new Cls_Data_Auth();
            string        Ip   = auth.GetIPAddress(HttpContext.Current.Request);

            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", username);
            if (Session["status"] == "1")
            {
                ht.Add("flag", "N");
            }
            else if (Session["status"] == "0")
            {
                ht.Add("flag", "Y");
            }


            Cls_BLL_TransHwayGlobalAutoRenew obj = new Cls_BLL_TransHwayGlobalAutoRenew();
            string response = obj.statuschange(ht);

            if (response == "ex_occured")
            {
                Response.Redirect("~/ErrorPage.aspx");
                return;
            }
            string[] strrnw = new string[4];

            strrnw = response.Split(',');

            lblmsg.Text = strrnw[1];


            if (response.StartsWith("9999"))
            {
                lblmsg.Text = response.Split(',')[1];
            }
            else
            {
                lblmsg.Text = response;
            }
            btncancel.Visible = false;
            btnsubmit.Visible = false;
            btnclose.Visible  = true;
            popglobalmsgbox.Show();
        }