/// <summary> /// Upload the NDA copy for this response /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Button_Submit_Click(object sender, EventArgs e) { //RFQResponse respObj = RFQResponse. //getRFQResponseforRFQIdandResponseEntityIdDB(Session[SessionFactory.ALL_PURCHASE_ALL_RFQ_SELECTED_RFQ_ID].ToString(), RFQDetails rfqObj = RFQDetails.getRFQDetailsbyIdDB(Session[SessionFactory.ALL_PURCHASE_ALL_RFQ_SELECTED_RFQ_ID].ToString()); try { if (rfqObj != null && rfqObj.getRFQId() != null && !rfqObj.getRFQId().Equals("")) { rfqObj.setFileStream(FileUpload1); RFQDetails.updateorInsertRFQNDADB(rfqObj); } Label_Upload_Stat.Visible = true; Label_Upload_Stat.Text = "upload successfull"; Label_Upload_Stat.ForeColor = System.Drawing.Color.Green; String docName = ""; if (rfqObj.getNDADocPath() != null) { String[] docPathList = rfqObj.getNDADocPath(). Split(new String[] { "\\" }, StringSplitOptions.RemoveEmptyEntries); if (docPathList.Length > 0) { docName = docPathList[docPathList.Length - 1]; } } LinkButton_New_NDA.Text = docName; DataTable dt = (DataTable)Session[SessionFactory.ALL_PURCHASE_ALL_RFQ_GRID_DATA]; int dataItemIndex = Int32.Parse(Request.QueryString.GetValues("dataItemIndex")[0]); dt.Rows[dataItemIndex]["Hidden_Doc_Name"] = docName; dt.DefaultView.Sort = "Submit Date Ticks" + " " + "DESC"; Session[SessionFactory.ALL_PURCHASE_ALL_RFQ_GRID_DATA] = dt.DefaultView.ToTable(); ScriptManager.RegisterStartupScript(this, typeof(string), "RefreshRefqGrid", "RefreshParent();", true); } catch (Exception ex) { Label_Upload_Stat.Visible = true; Label_Upload_Stat.Text = "upload failed"; Label_Upload_Stat.ForeColor = System.Drawing.Color.Red; } }
protected void Page_Load(object sender, EventArgs e) { String createMode = Request.QueryString.GetValues("createMode")[0]; //For Manually created potential dont show the "original document uploaded by client" link if (createMode.Equals(BackEndObjects.RFQShortlisted.POTENTIAL_CREATION_MODE_MANUAL)) { orgCopyHeader.Visible = false; orgCopyLink.Visible = false; } Dictionary <String, bool> accessList = (Dictionary <String, bool>)Session[SessionFactory.ACCESSLIST_FOR_USER]; if (accessList[BackEndObjects.EntityAccessListRecord.ENTITY_ACCESS_LIST_RECORD_ACCESS_OWNER_ACCESS] || accessList[BackEndObjects.EntityAccessListRecord.ENTITY_ACCESS_LIST_RECORD_ACCESS_EDIT_POTENTIAL]) { FileUpload1.Enabled = true; } else { FileUpload1.Enabled = false; Button_Submit.Enabled = false; Label_Upload_Stat.Text = "You dont have edit access to Potential records"; Label_Upload_Stat.Visible = true; Label_Upload_Stat.ForeColor = System.Drawing.Color.Red; } RFQDetails rfqObj = RFQDetails.getRFQDetailsbyIdDB(Session[SessionFactory.ALL_SALE_ALL_POTENTIAL_SELECTED_RFQ_ID].ToString()); String docName = ""; if (rfqObj.getNDADocPath() != null && !rfqObj.getNDADocPath().Equals("")) { String[] docPathList = rfqObj.getNDADocPath(). Split(new String[] { "\\" }, StringSplitOptions.RemoveEmptyEntries); if (docPathList.Length > 0) { docName = docPathList[docPathList.Length - 1]; } LinkButton_Org_NDA_Path.Text = docName; } else { LinkButton_Org_NDA_Path.Text = "N/A"; } RFQResponse respObj = RFQResponse.getRFQResponseforRFQIdandResponseEntityIdDB(Session[SessionFactory.ALL_SALE_ALL_POTENTIAL_SELECTED_RFQ_ID].ToString(), Session[SessionFactory.MAIN_BUSINESS_ENTITY_ID_STRING].ToString()); if (respObj.getNdaPath() != null && !respObj.getNdaPath().Equals("")) { String[] docPathList = respObj.getNdaPath(). Split(new String[] { "\\" }, StringSplitOptions.RemoveEmptyEntries); if (docPathList.Length > 0) { docName = docPathList[docPathList.Length - 1]; } LinkButton_New_NDA.Text = docName; } else { LinkButton_New_NDA.Text = "N/A"; } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { String rfId = Request.QueryString.GetValues("rfId")[0]; String context = Request.QueryString.GetValues("context")[0]; String poId = Request.QueryString.GetValues("poId")[0]; String otherEntId = ""; //This flag determines whether or no any tax component is changed in this screen Label_Inv_Tax_Comp_Changed.Text = "N"; String invId = Request.QueryString.GetValues("invId")[0]; BackEndObjects.Invoice invObj = new BackEndObjects.Invoice(); if (invId != null && !invId.Equals("")) { invObj = BackEndObjects.Invoice.getInvoicebyIdDB(invId); loadAlreadyCreatedInvData(invObj); } else { //If invoice data does not exist then forward to create invoice screen String forwardString = "/Pages/createInvoice.aspx"; forwardString += "?rfId=" + rfId; if (poId == null || poId.Equals("")) { forwardString += "&emptySO=" + "true"; } Response.Redirect(forwardString); //Server.Transfer(forwardString); //ScriptManager.RegisterStartupScript(this, typeof(string), "createInv", "window.open('" + forwardString + "',null,'resizeable=yes,scrollbars=yes,addressbar=no,toolbar=no,width=900,Height=900');", true); } // Button_Update_Inv.Visible = false; RFQShortlisted rfqDealObj = BackEndObjects.RFQShortlisted.getRFQShortlistedEntryforFinalizedVendor(rfId); if (context.Equals("client") || context.Equals("clientInvoiceGrid")) { otherEntId = rfqDealObj.getRespEntityId(); //If control is in client context, then the invoice is already created and the response entity details are available if (otherEntId == null || otherEntId.Equals("")) { otherEntId = invObj.getRespEntityId(); } } else { bool approvalContext = false; if (Request.QueryString.GetValues("approvalContext") != null) { approvalContext = Request.QueryString.GetValues("approvalContext")[0].Equals("Y") ? true : false; } if (approvalContext) { Button_Create_Inv.Enabled = false; Button_Update_Inv.Enabled = false; Label_INV_Creation_Stat.Visible = true; Label_INV_Creation_Stat.Text = "To edit anything for this invoice, please check the invoice from Sales->Invoice screen."; Label_INV_Creation_Stat.ForeColor = System.Drawing.Color.Red; } else { Dictionary <String, bool> accessList = (Dictionary <String, bool>)Session[SessionFactory.ACCESSLIST_FOR_USER]; if (!accessList[BackEndObjects.EntityAccessListRecord.ENTITY_ACCESS_LIST_RECORD_ACCESS_EDIT_INVOICE_SALES] && !accessList[BackEndObjects.EntityAccessListRecord.ENTITY_ACCESS_LIST_RECORD_ACCESS_OWNER_ACCESS]) { Label_INV_Creation_Stat.Visible = true; Label_INV_Creation_Stat.Text = "You don't have edit access to invoice record"; Label_INV_Creation_Stat.ForeColor = System.Drawing.Color.Red; Button_Create_Inv.Enabled = false; Button_Update_Inv.Enabled = false; } } otherEntId = RFQDetails.getRFQDetailsbyIdDB(rfId).getEntityId(); } loadClientAndVendorDetails(rfId, otherEntId); loadProductGrid(poId); populateLogo(otherEntId, context); loadInvTaxCompGrid(invId); loadTnC(invObj); updateTotalINVAmount(); if (context.Equals("client") || context.Equals("clientInvoiceGrid")) { disableControlsForClient(); } } }