示例#1
0
        protected void loadMSoSection()
        {
            if (Session["username"] != null || Session["operator_id"] != null)
            {
                Cls_Business_MstLCOPreMSOUDefine obj = new Cls_Business_MstLCOPreMSOUDefine();
                Hashtable htResponse = obj.GetTransations(txtCompanySearch.Text, username);

                DataTable dt = null;
                if (htResponse["htResponse"] != null)
                {
                    dt = (DataTable)htResponse["htResponse"];
                }

                if (dt == null)
                {
                    Response.Redirect("~/ErrorPage.aspx");
                    return;
                }

                if (dt.Rows.Count == 0)
                {
                    lblCompanyName.Text = "";
                    lblResponseMsg.Text = "No data found...";
                    pnlDetails.Visible  = false;
                }
                else
                {
                    lblCompanyName.Text = dt.Rows[0]["var_comp_companyname"].ToString();
                    ViewState["state"]  = dt.Rows[0]["var_comp_state"].ToString();
                    ViewState["city"]   = dt.Rows[0]["var_comp_city"].ToString();
                    lblResponseMsg.Text = "";

                    pnlDetails.Visible = true;
                }
            }
            else
            {
                Session.Abandon();
                Response.Redirect("~/Login.aspx");
            }
        }
示例#2
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            Hashtable ht = new Hashtable();

            ht["companyname"] = lblCompanyName.Text;

            string flag = "";

            if (rbtnCashier.Checked == true)
            {
                flag = "C";
            }
            else
            {
                flag = "F";
            }
            ht["flag"] = flag;

            string userid1 = txtUserId.Text;

            ht["loginid"] = userid1;

            string fname = txtFirstName.Text;

            ht["fname"] = fname;
            string mname = txtMidName.Text;

            ht["mname"] = mname;
            string lname = txtLastName.Text;

            ht["lname"] = lname;
            string jv     = "0";
            string direct = "0";

            if (rdJV.Checked)
            {
                jv = txtJvDirNo.Text;
            }
            else
            {
                direct = txtJvDirNo.Text;
            }
            ht["jv"]     = jv;
            ht["direct"] = direct;
            string brmpoid = txtBrmId.Text;

            ht["brmpoid"] = brmpoid;

            string addr = txtAddress.Text;

            ht["addr"] = addr;
            string state = ddlState.SelectedValue.ToString();

            ht["state"] = state;
            string city = ddlCity.SelectedValue.ToString();

            ht["city"] = city;
            string pincode = txtPincode.Text;

            ht["pincode"] = pincode;
            string mobileno = txtMobile.Text;

            ht["mobileno"] = mobileno;
            string email = txtEmail.Text;

            ht["email"] = email;

            Cls_Business_MstLCOPreMSOUDefine obj = new Cls_Business_MstLCOPreMSOUDefine();
            string username = "";
            string compcode = "";

            if (Session["username"] != null)
            {
                username = Convert.ToString(Session["username"]);
                compcode = Convert.ToString(Session["opr_code"]);
            }
            else
            {
                Session.Abandon();
                Response.Redirect("~/Login.aspx");
            }
            ht["compcode"] = "HWP";//compcode;
            string response = obj.setUserData(username, ht);

            reset();
            if (response == "ex_occured")
            {
                //exception occured
                Response.Redirect("~/ErrorPage.aspx");
                return;
            }
            else
            {
                lblResponseMsg.Text = response;
            }
        }