/// <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"; } }