Ejemplo n.º 1
0
    protected void SendTovessel()
    {
        if (chkSendTovessel.Checked == true)
        {
            TechnicalBAL objpurch = new TechnicalBAL();

            objpurch.Insert_sendToVessel(Request.QueryString["document_code"].ToString(), Request.QueryString["REQUISITION_CODE"].ToString(), 1);
            btnSendToVessel.Enabled = false;
            chkSendTovessel.Enabled = false;

            int sts = objpurch.Get_SendToVessel(Request.QueryString["document_code"].ToString(), Request.QueryString["REQUISITION_CODE"].ToString());
            if (sts == 1 || !Request.QueryString["REQUISITION_CODE"].Contains("-O"))
            {
                chkSendTovessel.Enabled = false;
                btnSendToVessel.Enabled = false;
            }

            String msg = String.Format("alert('Requisition has been sent to vessel'); ");
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgsentreq", msg, true);
        }
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxFileUpload1.MaximumSizeOfFile = sizeupload;
        //AjaxFileUpload1.MaximumSizeOfFile = Int32.Parse(dt.Rows[0]["Size_KB"].ToString());
        if (AjaxFileUpload1.IsInFileUploadPostBack)
        {
        }
        else
        {
            //UserAccessValidation();
            btnLoadFiles.Attributes.Add("style", "visibility:hidden");

            txtDocumentCode.Text = Request.QueryString["document_code"].ToString();
            txtReqCode.Text      = Request.QueryString["REQUISITION_CODE"].ToString();
            txtVessselCode.Text  = Request.QueryString["Vessel_Code"].ToString();
            if (BLL_PURC_Common.Get_Reqsn_IsValidToClose(Request.QueryString["REQUISITION_CODE"].ToString()) > 0)
            {
                btnCloseRequisition.Enabled = true;
            }

            if (IsPostBack)
            {
                GridViewHelper helper = new GridViewHelper(this.gvReqsnItems);
                helper.RegisterGroup("Subsystem_Description", true, true);
                helper.GroupHeader += new GroupEvent(helper_GroupHeader);

                //ucPurcAttachment1.Register_JS_Attach();
                Session["PURCATTACHEDFILES"] = ASP.global_asax.AttachedFile;
            }
            if (!IsPostBack)
            {
                lbtnAllremarks.Attributes.Add("onmouseover", "javascript:GetRemarkToolTip('" + Request.QueryString["Document_Code"] + "','1',event);return false;");
                lbtnAllremarks.Attributes.Add("onmouseout", "javascript:CloseRemarkToolTip();return false;");
                lbtnAllremarks.Attributes.Add("onclick", "javascript:GetRemarkAll('" + Request.QueryString["Document_Code"] + "','" + GetSessionUserID() + "','1',event);return false;");

                Session["PURCATTACHEDFILES"] = "";
                ASP.global_asax.AttachedFile = "";

                GridViewHelper helper = new GridViewHelper(this.gvReqsnItems);
                helper.RegisterGroup("Subsystem_Description", true, true);
                helper.GroupHeader += new GroupEvent(helper_GroupHeader);


                Session["REQSN_DETAILS_REQUISITION_CODE"] = Request.QueryString["REQUISITION_CODE"].ToString();
                Session["REQSN_DETAILS_VESSEL_CODE"]      = Request.QueryString["Vessel_Code"].ToString();
                BindRequisitionSummary();
                TechnicalBAL objpurch = new TechnicalBAL();
                int          sts      = objpurch.Get_SendToVessel(Request.QueryString["document_code"].ToString(), Request.QueryString["REQUISITION_CODE"].ToString());
                if (sts == 1 || !Request.QueryString["REQUISITION_CODE"].Contains("-O"))
                {
                    chkSendTovessel.Enabled = false;
                    btnSendToVessel.Enabled = false;
                }

                ucPurcCancelReqsnNew.ReqsnNumber = Request.QueryString["REQUISITION_CODE"];
                ucPurcCancelReqsnNew.DocCode     = Request.QueryString["document_code"];
                ucPurcCancelReqsnNew.VesselCode  = Request.QueryString["Vessel_Code"];
                BindReqsTypeLog();
                //rptCrew.DataSource = BLL_PURC_Common.GET_REQSN_VMT(Request.QueryString["document_code"]);
                //rptCrew.DataBind();

                BindPurcQuestion();
                LoadWorkListInvolved();
            }

            if (Request.QueryString["hold"] != null) // this hold will come from new and sent rfq/status only ,means if it is null then it has been sent for approval
            {
                string holdSTS = Request.QueryString["hold"];
                if (holdSTS.ToLower() == "false")
                {
                    btnSendRFQ.Enabled = true;
                    btnCancel.Enabled  = true;
                }
            }

            if (Convert.ToString(ViewState["OnHold"]) == "0")
            {
                btnHold.Text = "Hold Requisition";
            }
            else
            {
                btnHold.Text = "UnHold Requisition";
            }


            dvCancelReq.Visible = false;
            divOnHold.Visible   = false;

            dlistPONumber.DataSource = BLL_PURC_Common.Get_PONumbers(Request.QueryString["REQUISITION_CODE"].ToString());
            dlistPONumber.DataBind();
        }
        DocCode   = Convert.ToString(Request.QueryString["document_code"]);
        VESSEL_ID = Convert.ToInt32(Request.QueryString["Vessel_Code"]);
        OFFICE_ID = 0;
    }