예제 #1
0
        protected void Button_Submit_Extra_Prd_Srv_Click(object sender, EventArgs e)
        {
            if (DropDownList_Level1.SelectedValue.Equals("_"))
            {
                Label_Status.Text      = "Please select one product category";
                Label_Status.ForeColor = System.Drawing.Color.Red;
                Label_Status.Visible   = true;
                Label_Status.Focus();
            }
            else
            {
                Label_Status.Visible = false;

                Buttin_Show_Spec_List.Enabled = true;
                DropDownList_Locality.Enabled = false;
                DropDownList_State.Enabled    = false;
                DropDownList_Country.Enabled  = false;
                DropDownList_City.Enabled     = false;
                DropDownList_Contacts.Enabled = false;
                TextBox_Within_Date.Enabled   = false;
                TextBox_Reqr_Name.Enabled     = false;
                TextBox_TnC.Enabled           = false;
                TextBox_Street_Name.Enabled   = false;
                FileUpload1.Enabled           = false;

                Label_Selected_List.Text = "";
                Label_Extra_Spec.Visible = false;
                if (!TextBox_Spec.Text.Equals(""))
                {
                    getAddintionalProdSrvList();

                    TextBox_Spec.Text = "";
                }
                TextBox_Spec.Visible            = false;
                Label_Extra_Spec_upload.Visible = false;
                FileUpload_Extra_Spec.Visible   = false;

                GridView1.Visible = false;
                DropDownList_Level1.SelectedValue = "_";
                DropDownList_Level2.SelectedIndex = -1;
                DropDownList_Level3.SelectedIndex = -1;

                if (FileUpload1 != null && FileUpload1.HasFile)
                {
                    Session[SessionFactory.CREATE_LEAD_NDA_FILE] = FileUpload1;
                }

                ArrayList prodSrvQntyList = (ArrayList)Session[SessionFactory.CREATE_LEAD_PROD_SRV_QNTY_LIST];

                if (prodSrvQntyList == null)
                {
                    prodSrvQntyList = new ArrayList();
                }

                BackEndObjects.RFQProdServQnty rfqpPrdSrvQntyObj = new RFQProdServQnty();
                rfqpPrdSrvQntyObj.setFromPrice(TextBox_Price_Range_From.Text);
                rfqpPrdSrvQntyObj.setToPrice(TextBox_Price_Range_To.Text);
                rfqpPrdSrvQntyObj.setMsrmntUnit(DropDownList_Unit_Of_Msrmnt.SelectedValue);
                rfqpPrdSrvQntyObj.setProdCatId(Session[SessionFactory.CREATE_LEAD_SELECTED_PRODUCT_CAT].ToString());
                rfqpPrdSrvQntyObj.setFromQnty(float.Parse(TextBox_Prod_Qnty_From.Text));
                rfqpPrdSrvQntyObj.setToQnty(float.Parse(TextBoxrod_Qnty_To.Text));

                prodSrvQntyList.Add(rfqpPrdSrvQntyObj);

                Session[SessionFactory.CREATE_LEAD_PROD_SRV_QNTY_LIST] = prodSrvQntyList;

                BackEndObjects.RFQResponseQuotes leadRespQuoteObjs = new RFQResponseQuotes();
                leadRespQuoteObjs.setPrdCatId(Session[SessionFactory.CREATE_LEAD_SELECTED_PRODUCT_CAT].ToString());
                leadRespQuoteObjs.setQuote(TextBox_Quote_Amnt.Text);
                leadRespQuoteObjs.setResponseEntityId(Session[SessionFactory.MAIN_BUSINESS_ENTITY_ID_STRING].ToString());
                leadRespQuoteObjs.setResponseUsrId(User.Identity.Name);
                //leadRespQuoteObjs.setUnitName(Session[SessionFactory.CREATE_LEAD_QUOTE_UNIT].ToString());
                leadRespQuoteObjs.setUnitName(Label_Per_Unit.Text);
                leadRespQuoteObjs.setProductName((!TextBox_Prod_Name.Text.Equals("") ? TextBox_Prod_Name.Text.Trim() : DropDownList_Prod_List.SelectedItem.Text));

                ArrayList leadRespQuoteList = (ArrayList)Session[SessionFactory.CREATE_LEAD_RESP_QUOTE_LIST];

                if (leadRespQuoteList == null)
                {
                    leadRespQuoteList = new ArrayList();
                }

                leadRespQuoteList.Add(leadRespQuoteObjs);

                Session[SessionFactory.CREATE_LEAD_RESP_QUOTE_LIST] = leadRespQuoteList;
            }
        }
예제 #2
0
        protected void Button_Submit_Extra_Prd_Srv_Click(object sender, EventArgs e)
        {
            if (DropDownList_Level1.SelectedValue.Equals("_"))
            {
                Label_Status.Text      = "Please select one product category";
                Label_Status.ForeColor = System.Drawing.Color.Red;
                Label_Status.Visible   = true;
                Label_Status.Focus();
            }
            else
            {
                Label_Status.Visible = false;

                Buttin_Show_Spec_List1.Enabled = true;
                DropDownList_Locality.Enabled  = false;
                DropDownList_State.Enabled     = false;
                DropDownList_Country.Enabled   = false;
                DropDownList_City.Enabled      = false;
                TextBox_Within_Date.Enabled    = false;
                TextBox_Reqr_Name.Enabled      = false;
                TextBox_TnC.Enabled            = false;
                TextBox_Street_Name.Enabled    = false;
                FileUpload1.Enabled            = false;

                Label_Extra_Spec.Visible = false;
                Label_Selected_List.Text = "";

                if (!TextBox_Spec.Text.Equals(""))
                {
                    getAddintionalProdSrvList();

                    TextBox_Spec.Text = "";
                }
                TextBox_Spec.Visible            = false;
                Label_Extra_Spec_upload.Visible = false;
                FileUpload2.Visible             = false;

                GridView1.Visible = false;
                DropDownList_Level1.SelectedValue = "_";
                DropDownList_Level2.SelectedIndex = -1;
                DropDownList_Level3.SelectedIndex = -1;

                if (FileUpload1 != null && FileUpload1.HasFile)
                {
                    Session[SessionFactory.CREATE_RFQ_NDA_FILE] = FileUpload1;
                }

                ArrayList prodSrvQntyList = (ArrayList)Session[SessionFactory.CREATE_RFQ_PROD_SRV_QNTY_LIST];

                if (prodSrvQntyList == null)
                {
                    prodSrvQntyList = new ArrayList();
                }

                BackEndObjects.RFQProdServQnty rfqpPrdSrvQntyObj = new RFQProdServQnty();
                rfqpPrdSrvQntyObj.setFromPrice(TextBox_Price_Range_From.Text);
                rfqpPrdSrvQntyObj.setToPrice(TextBox_Price_Range_To.Text);
                rfqpPrdSrvQntyObj.setMsrmntUnit(DropDownList_Unit_Of_Msrmnt.SelectedValue);
                rfqpPrdSrvQntyObj.setProdCatId(Session[SessionFactory.CREATE_RFQ_SELECTED_PRODUCT_CAT].ToString());
                rfqpPrdSrvQntyObj.setFromQnty(float.Parse(TextBox_Prod_Qnty_From.Text));
                rfqpPrdSrvQntyObj.setToQnty(float.Parse(TextBoxrod_Qnty_To.Text));

                prodSrvQntyList.Add(rfqpPrdSrvQntyObj);

                Session[SessionFactory.CREATE_RFQ_PROD_SRV_QNTY_LIST] = prodSrvQntyList;
            }
        }