Esempio n. 1
0
        protected void fillListDropDown()
        {
            if (DropDownList_BroadCast_List != null && DropDownList_BroadCast_List.Items.Count > 0)
            {
                DropDownList_BroadCast_List.Items.Clear();
            }

            ListItem lt1 = new ListItem();

            lt1.Text  = BackEndObjects.RFQBroadcastList.RFQ_BROADCAST_TO_ALL;
            lt1.Value = BackEndObjects.RFQBroadcastList.RFQ_BROADCAST_TO_ALL;

            ListItem lt2 = new ListItem();

            lt2.Text  = BackEndObjects.RFQBroadcastList.RFQ_BROADCAST_TO_ALL_INTERESTED;
            lt2.Value = BackEndObjects.RFQBroadcastList.RFQ_BROADCAST_TO_ALL_INTERESTED;

            DropDownList_BroadCast_List.Items.Add(lt1);
            DropDownList_BroadCast_List.Items.Add(lt2);

            ArrayList contactObjList = BackEndObjects.Contacts.getAllContactsbyEntityIdDB(Session[SessionFactory.MAIN_BUSINESS_ENTITY_ID_STRING].ToString());

            for (int i = 0; i < contactObjList.Count; i++)
            {
                BackEndObjects.Contacts contactObj = (BackEndObjects.Contacts)contactObjList[i];
                if (contactObj.getFromSite().Equals("Y", StringComparison.InvariantCultureIgnoreCase))
                {
                    ListItem lt = new ListItem();
                    lt.Text  = contactObj.getContactName();
                    lt.Value = contactObj.getContactEntityId();
                    DropDownList_BroadCast_List.Items.Add(lt);
                }
            }


            DropDownList_BroadCast_List.SelectedIndex = -1;
        }
Esempio n. 2
0
        protected void fillCustData()
        {
            String[] entId = Request.QueryString.GetValues("entityId");

            Panel_Customer.GroupingText = "Entity Details";

            Dictionary <String, Object> custObj = ActionLibrary.customerDetails.getContactDetails(entId[0], Session[SessionFactory.MAIN_BUSINESS_ENTITY_ID_STRING].ToString());

            String localId = "";


            if (custObj.ContainsKey(ActionLibrary.customerDetails.RETURN_OBJECT_TYPE_CONTACT_DETAILS))
            {
                BackEndObjects.Contacts cOBJ = (BackEndObjects.Contacts)custObj[ActionLibrary.customerDetails.RETURN_OBJECT_TYPE_CONTACT_DETAILS];
                Label_Cust_Name.Text  = cOBJ.getContactName();
                Label_Email.Text      = cOBJ.getEmailId();
                Label_Contact_No.Text = cOBJ.getMobNo();
                Label_From_Site.Text  = cOBJ.getFromSite();
                localId = cOBJ.getLocalityId();

                //If the contact object is created from the site then get the Main proudct details
                if (cOBJ.getFromSite().Equals("Y"))
                {
                    Dictionary <String, BackEndObjects.ProductCategory> mainProds = BackEndObjects.MainBusinessEntity.getProductDetailsforMainEntitybyIdDB(cOBJ.getContactEntityId());
                    String mainProdList = "";

                    foreach (KeyValuePair <String, BackEndObjects.ProductCategory> kvp in mainProds)
                    {
                        mainProdList = (mainProdList.Equals("") ? ((BackEndObjects.ProductCategory)kvp.Value).getProductCategoryName() : mainProdList +
                                        "," + ((BackEndObjects.ProductCategory)kvp.Value).getProductCategoryName());
                    }

                    Label_Main_Business.Text = (!mainProdList.Equals("") ? mainProdList : Label_Main_Business.Text);
                }
            }
            else
            {
                BackEndObjects.MainBusinessEntity mBObj = (BackEndObjects.MainBusinessEntity)custObj[ActionLibrary.customerDetails.RETURN_OBJECT_TYPE_MAIN_BUSINESS_ENTITY];
                Label_Cust_Name.Text  = mBObj.getEntityName();
                Label_Email.Text      = mBObj.getEmailId();
                Label_Contact_No.Text = mBObj.getPhNo();
                Label_From_Site.Text  = "Y";

                Dictionary <String, BackEndObjects.ProductCategory> mainProds = mBObj.getMainProductServices();
                //BackEndObjects.MainBusinessEntity.getProductDetailsforMainEntitybyIdDB(mBObj.getEntityId());
                String mainProdList = "";

                if (mainProds != null)
                {
                    foreach (KeyValuePair <String, BackEndObjects.ProductCategory> kvp in mainProds)
                    {
                        mainProdList = (mainProdList.Equals("") ? ((BackEndObjects.ProductCategory)kvp.Value).getProductCategoryName() : mainProdList + "," + ((BackEndObjects.ProductCategory)kvp.Value).getProductCategoryName());
                    }
                }

                Label_Main_Business.Text = (!mainProdList.Equals("") ? mainProdList : Label_Main_Business.Text);
                if (mBObj.getAddressDetails() != null)
                {
                    localId = mBObj.getAddressDetails().getLocalityId();
                }
            }

            if (localId != null && !localId.Equals(""))
            {
                BackEndObjects.Localities lclObj = BackEndObjects.Localities.getLocalitybyIdDB(localId);
                BackEndObjects.City       ctObj  = BackEndObjects.Localities.getCityDetailsforLocalitywoOtherAsscLocalitiesDB(localId);
                BackEndObjects.State      stObj  = BackEndObjects.City.getStateDetailsforCitywoOtherAsscCitiesDB(ctObj.getCityId());
                BackEndObjects.Country    cntObj = BackEndObjects.State.getCountryDetailsforStatewoOtherAsscStatesDB(stObj.getStateId());

                Label_Country.Text  = cntObj.getCountryName();
                Label_State.Text    = stObj.getStateName();
                Label_City.Text     = ctObj.getCityName();
                Label_Locality.Text = lclObj.getLocalityName();
            }
        }
Esempio n. 3
0
        protected void fillCustData()
        {
            Dictionary <String, Object> custObj = (Dictionary <String, Object>)Session[SessionFactory.ALL_SALE_ALL_POTENTIAL_SELECTED_CUSTOMER_OBJ];
            String localId = "";


            if (custObj.ContainsKey(ActionLibrary.customerDetails.RETURN_OBJECT_TYPE_CONTACT_DETAILS))
            {
                BackEndObjects.Contacts cOBJ = (BackEndObjects.Contacts)custObj[ActionLibrary.customerDetails.RETURN_OBJECT_TYPE_CONTACT_DETAILS];
                Label_Cust_Name.Text  = cOBJ.getContactName();
                Label_Email.Text      = cOBJ.getEmailId();
                Label_Contact_No.Text = cOBJ.getMobNo();
                Label_From_Site.Text  = cOBJ.getFromSite();
                localId = cOBJ.getLocalityId();

                //If the contact object is created from the site then get the Main proudct details
                if (cOBJ.getFromSite().Equals("Y"))
                {
                    Dictionary <String, BackEndObjects.ProductCategory> mainProds = BackEndObjects.MainBusinessEntity.getProductDetailsforMainEntitybyIdDB(cOBJ.getContactEntityId());
                    String mainProdList = "";

                    foreach (KeyValuePair <String, BackEndObjects.ProductCategory> kvp in mainProds)
                    {
                        mainProdList = (mainProdList.Equals("") ? ((BackEndObjects.ProductCategory)kvp.Value).getProductCategoryName() : mainProdList +
                                        "," + ((BackEndObjects.ProductCategory)kvp.Value).getProductCategoryName());
                    }

                    Label_Main_Business.Text = (!mainProdList.Equals("") ? mainProdList : Label_Main_Business.Text);
                }
                else
                {
                    String[] prodCatArray = cOBJ.getProdList().Split(new String[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                    String   mainProdList = "";

                    for (int i = 0; i < prodCatArray.Length; i++)
                    {
                        mainProdList = (mainProdList.Equals("") ? BackEndObjects.ProductCategory.getProductCategorybyIdwoFeaturesDB(prodCatArray[i]).getProductCategoryName() : mainProdList +
                                        "," + BackEndObjects.ProductCategory.getProductCategorybyIdwoFeaturesDB(prodCatArray[i]).getProductCategoryName());
                    }

                    Label_Main_Business.Text = (!mainProdList.Equals("") ? mainProdList : Label_Main_Business.Text);
                }
            }
            else
            {
                BackEndObjects.MainBusinessEntity mBObj = (BackEndObjects.MainBusinessEntity)custObj[ActionLibrary.customerDetails.RETURN_OBJECT_TYPE_MAIN_BUSINESS_ENTITY];
                Label_Cust_Name.Text  = mBObj.getEntityName();
                Label_Email.Text      = mBObj.getEmailId();
                Label_Contact_No.Text = mBObj.getPhNo();
                Label_From_Site.Text  = "Y";

                Dictionary <String, BackEndObjects.ProductCategory> mainProds = mBObj.getMainProductServices();
                //BackEndObjects.MainBusinessEntity.getProductDetailsforMainEntitybyIdDB(mBObj.getEntityId());
                String mainProdList = "";

                if (mainProds != null)
                {
                    foreach (KeyValuePair <String, BackEndObjects.ProductCategory> kvp in mainProds)
                    {
                        mainProdList = (mainProdList.Equals("") ? ((BackEndObjects.ProductCategory)kvp.Value).getProductCategoryName() : mainProdList + "," + ((BackEndObjects.ProductCategory)kvp.Value).getProductCategoryName());
                    }
                }

                Label_Main_Business.Text = (!mainProdList.Equals("") ? mainProdList : Label_Main_Business.Text);
                if (mBObj.getAddressDetails() != null)
                {
                    localId = mBObj.getAddressDetails().getLocalityId();
                }
            }

            if (localId != null && !localId.Equals(""))
            {
                BackEndObjects.Localities lclObj = BackEndObjects.Localities.getLocalitybyIdDB(localId);

                BackEndObjects.City ctObj = BackEndObjects.Localities.getCityDetailsforLocalitywoOtherAsscLocalitiesDB(localId);

                String cityId = (ctObj != null && ctObj.getCityId() != null && !ctObj.getCityId().Equals("") ? ctObj.getCityId() : localId);
                BackEndObjects.State stObj = BackEndObjects.City.getStateDetailsforCitywoOtherAsscCitiesDB(cityId);
                if (cityId.Equals(localId))
                {
                    ctObj = BackEndObjects.City.getCitybyIdwoLocalitiesDB(localId);
                }

                String stateId = (stObj != null && stObj.getStateId() != null && !stObj.getStateId().Equals("") ? stObj.getStateId() : localId);
                BackEndObjects.Country cntObj = BackEndObjects.State.getCountryDetailsforStatewoOtherAsscStatesDB(stateId);
                if (stateId.Equals(localId))
                {
                    stObj = BackEndObjects.State.getStatebyIdwoCitiesDB(stateId);
                }

                if (cntObj != null && cntObj.getCountryName() != null && !cntObj.getCountryName().Equals(""))
                {
                    Label_Country.Text = cntObj.getCountryName();
                }

                if (stObj != null && stObj.getStateName() != null && !stObj.getStateName().Equals(""))
                {
                    Label_State.Text = stObj.getStateName();
                }

                if (ctObj != null && ctObj.getCityName() != null && !ctObj.getCityName().Equals(""))
                {
                    Label_City.Text = ctObj.getCityName();
                }

                if (lclObj != null && lclObj.getLocalityName() != null && !lclObj.getLocalityName().Equals(""))
                {
                    Label_Locality.Text = lclObj.getLocalityName();
                }
            }
        }