Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        UserDetail usrDetails = null;

        if (Session["UserDetails"] != null)
        {
            usrDetails = Session["UserDetails"] as UserDetail;
        }
        else
        {
            Response.Redirect("~/login.aspx");
            return;
        }

        this.ShowQOH.Attributes["value"] = usrDetails.QOH;

        this.SubmitMessage.Attributes["value"] = GetSubmitMessage();

        string orderNo = Request.QueryString["orderno"];

        this.OrderNo.Attributes["value"] = orderNo;

        TurningpointDataComponent tpsData = new TurningpointDataComponent();

        this.CustNo.Attributes["value"] = tpsData.GetOrderCustomer(decimal.Parse(orderNo));

        if (ConfigurationManager.AppSettings["RX"] == "yes")
        {
            this.RX.Attributes["value"] = "Y";
        }
        else
        {
            this.RX.Attributes["value"] = "N";
        }
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            UserDetail usrDetails = null;
            if (Session["UserDetails"] != null)
            {
                usrDetails = Session["UserDetails"] as UserDetail;
            }
            else
            {
                Response.Write("<script>window.open('login.aspx','_top');</script>");
                return;
            }

            this.ShowQOH.Attributes["value"] = usrDetails.QOH;

            string orderNo = Request.QueryString["orderno"];
            this.OrderNo.Attributes["value"] = orderNo;

            if (decimal.Parse(orderNo) > 0)
            {
                TurningpointDataComponent tpsData = new TurningpointDataComponent();
                this.CustomerNo.Attributes["value"] = tpsData.GetOrderCustomer(decimal.Parse(orderNo));
            }
            else
            {
                this.CustomerNo.Attributes["value"] = usrDetails.TPSCustomerNumber;
            }

            string formName = Request.QueryString["form"];
            this.FormName.Attributes["value"] = formName;

            string editType = Request.QueryString["type"];
            this.EditType.Attributes["value"] = editType;

            if (editType == "form")
            {
                lblOrders.Text = "Edit Form";
            }

            FillDropDowns();

            if (ConfigurationManager.AppSettings["RX"] == "yes")
            {
                this.RX.Attributes["value"]   = "Y";
                search_params_item_title.Text = "Item#:";
                order_entry_hdr_qoh.InnerText = "BOH";
                new_items_hdr_qoh.InnerText   = "BOH";
                search_hdr_qoh.InnerText      = "BOH";
            }
            else
            {
                this.RX.Attributes["value"]   = "N";
                search_params_item_title.Text = "UPC or Item#:";
            }

            if (ConfigurationManager.AppSettings["LWD"] == "yes")
            {
                items_1.Visible = true;
                items_2.Visible = true;
            }

            if (ConfigurationManager.AppSettings["ShowDayOfWeek"] == "yes")
            {
                day_of_week.Visible       = true;
                day_of_week_label.Visible = true;
            }

            if (ConfigurationManager.AppSettings["ShowWillCall"] == "no")
            {
                will_call.Visible = false;
                will_call.Visible = false;
            }
        }
    }