protected void Button_Submit_Req_Next(object sender, EventArgs e)
        {
            createRfq();
            Label_Status.Focus();

            Buttin_Show_Spec_List1.Enabled = true;
            DropDownList_Locality.Enabled  = true;
            DropDownList_State.Enabled     = true;
            DropDownList_Country.Enabled   = true;
            DropDownList_City.Enabled      = true;
            TextBox_Within_Date.Enabled    = true;
            TextBox_Reqr_Name.Enabled      = true;
            TextBox_TnC.Enabled            = true;
            TextBox_Street_Name.Enabled    = true;
            FileUpload1.Enabled            = true;
            Label_Extra_Spec.Visible       = true;
            TextBox_Spec.Visible           = true;
            GridView1.Visible               = true;
            Label_Extra_Spec.Visible        = false;
            Label_Extra_Spec_upload.Visible = false;
            TextBox_Spec.Visible            = false;
            FileUpload2.Visible             = false;

            Label_Selected_List.Text = "";
            clearAllFields("Panel2");
            clearAllFields("Panel3");
            clearAllFields("Panel_Prod_Service_Det");
            clearAllFields("Panel_Prod_Srv_Qnty");
            clearAllFields("Panel_Price_Range");
            clearAllFields("Panel_Location");
        }
        /// <summary>
        /// create the requirement details
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button_Submit_Req_Click(object sender, EventArgs e)
        {
            Label_Status.Focus();
            Button_Submit_Req.Enabled           = false;
            Button_Submit_Next.Enabled          = false;
            Button_Submit_Extra_Prd_Srv.Enabled = false;

            createRfq();
        }
Beispiel #3
0
        private void Button_Save_Click(object sender, EventArgs e)
        {
            try
            {
                if (NumUpDown_LoopStart.Value >= NumUpDown_LoopEnd.Value && NumUpDown_LoopEnd.Value != 0)
                {
                    MessageBox.Show("Loop end must be bigger than loop start.");
                    return;
                }

                SaveFileDialog Dialog = new SaveFileDialog();
                Dialog.Filter = "BRSTM Files (*.brstm)|*.brstm|All files (*.*)|*.*";
                Dialog.ShowDialog();

                if (Dialog.FileName == "")
                {
                    return;
                }

                Label_Status.Text = "Saving BRSTM...";
                Label_Status.Update();

                if (CheckBox_IsLooped.Checked && (int)NumUpDown_LoopStart.Value > (int)NumUpDown_LoopEnd.Value)
                {
                    MessageBox.Show("Loop start cannot be smaller than the loop end");
                    return;
                }

                Convert((int)NumUpDown_LoopStart.Value, (int)NumUpDown_LoopEnd.Value, CheckBox_IsLooped.Checked, Dialog.FileName);

                Label_Status.Text = "Done!";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        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;
                Label_Selected_List.Text       = "";
                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_Street_Name.Enabled    = false;

                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;

                //Session[SessionFactory.CREATE_RFQ_NDA_FILE] = FileUpload1;

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

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

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

                prodSrvQntyList.Add(reqpPrdSrvQntyObj);

                Session[SessionFactory.CREATE_REQ_PROD_SRV_QNTY_LIST] = prodSrvQntyList;
            }
        }
Beispiel #5
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;
            }
        }