示例#1
0
        protected void fillRespQuoteGrid()
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("RespCompId");
            dt.Columns.Add("VendName");
            dt.Columns.Add("quote");
            dt.Columns.Add("NDA");
            dt.Columns.Add("DateVal");
            dt.Columns.Add("comm");
            dt.Columns.Add("ShortListed");

            int counter = 0;

            Dictionary <String, RFQResponse> respDict = RFQResponse.getAllRFQResponseforRFQIdDB(Session[SessionFactory.ALL_PURCHASE_ALL_RFQ_SELECTED_RFQ_ID].ToString());
            DateUtility dU = new DateUtility();

            foreach (KeyValuePair <String, RFQResponse> kvp in respDict)
            {
                RFQResponse respObj = (RFQResponse)kvp.Value;
                dt.Rows.Add();
                dt.Rows[counter]["RespCompId"] = respObj.getRespEntityId();
                dt.Rows[counter]["VendName"]   = MainBusinessEntity.getMainBusinessEntitybyIdwithLessDetailsDB(respObj.getRespEntityId()).getEntityName();
                dt.Rows[counter]["DateVal"]    = dU.getConvertedDate(respObj.getRespDate());

                BackEndObjects.RFQShortlisted shortObj = BackEndObjects.RFQShortlisted.
                                                         getRFQShortlistedbyRespEntandRFQId(respObj.getRespEntityId(),
                                                                                            Session[SessionFactory.ALL_PURCHASE_ALL_RFQ_SELECTED_RFQ_ID].ToString());

                if (shortObj != null && shortObj.getRFQId() != null && !shortObj.getRFQId().Equals(""))
                {
                    dt.Rows[counter]["ShortListed"] = "Y";
                }
                else
                {
                    dt.Rows[counter]["ShortListed"] = "N";
                }

                counter++;
            }

            GridView_RFQ_Resp_Quotes.DataSource = dt;
            GridView_RFQ_Resp_Quotes.DataBind();
            GridView_RFQ_Resp_Quotes.Columns[1].Visible = false;

            if (dt == null || dt.Rows.Count == 0)
            {
                Label_Empty_Quote.Visible = true;
            }
            else
            {
                Session[SessionFactory.ALL_PURCHASE_ALL_RFQ_ALL_QUOTES_GRID] = dt;
            }
        }
示例#2
0
        /// <summary>
        /// This method check if this respectiv entry was already shortlisted.
        /// Based on this result the shortlist button will be enabled/disabled
        /// </summary>
        /// <returns></returns>
        protected Boolean checkIfAlreadyShortListed()
        {
            BackEndObjects.RFQShortlisted shortObj = BackEndObjects.RFQShortlisted.
                                                     getRFQShortlistedbyRespEntandRFQId(Session[SessionFactory.ALL_PURCHASE_ALL_RFQ_SHOW_QUOTE_SELECTED_RESP_ENTITY_ID].ToString(),
                                                                                        Session[SessionFactory.ALL_PURCHASE_ALL_RFQ_SELECTED_RFQ_ID].ToString());

            Dictionary <String, bool> accessList = (Dictionary <String, bool>)Session[SessionFactory.ACCESSLIST_FOR_USER];

            if (shortObj != null && shortObj.getRFQId() != null && !shortObj.getRFQId().Equals(""))
            {
                return(false);
            }
            else if (accessList[BackEndObjects.EntityAccessListRecord.ENTITY_ACCESS_LIST_RECORD_ACCESS_EDIT_RFQ] ||
                     accessList[BackEndObjects.EntityAccessListRecord.ENTITY_ACCESS_LIST_RECORD_ACCESS_OWNER_ACCESS])
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }