Exemplo n.º 1
0
    protected void btnGivePriority_Click(object sender, EventArgs e)
    {
        if (txtJobNo.Text.Trim() == "")
        {
            lblMsg.Text    = "Please select Job/Quotation No";
            Timer1.Enabled = true;
            return;
        }

        if (txtRemarks.Text.Trim() == "")
        {
            lblMsg.Text    = "Please enter remark for prioritization";
            Timer1.Enabled = true;
            return;
        }


        try
        {
            string     UserCode   = "";
            string     UserBranch = "";
            HttpCookie reqCookies = Request.Cookies["userInfo"];
            if (reqCookies != null)
            {
                UserCode   = reqCookies["UserCode"].ToString();
                UserBranch = reqCookies["UserBranch"].ToString();
            }


            ProposalUploadController proposalUploadController = new ProposalUploadController();

            proposalUploadController.PrioritizeJob(txtProposalUploadId.Text, txtRemarks.Text, UserCode);


            ClearComponents();
            //  SearchData();
            lblMsg.Text    = "Successfully Prioritized";
            Timer1.Enabled = true;

            ManageFormComponents("INITIAL");


            //Response.Redirect("UserRegistration.aspx");
        }
        catch (Exception ex)
        {
            lblMsg.Text    = "Error While Saving";
            Timer1.Enabled = true;
        }
    }