Esempio n. 1
0
 private void FixupD_STATE(D_STATE previousValue)
 {
     if (D_STATE != null)
     {
         if (StateID != D_STATE.ID)
         {
             StateID = D_STATE.ID;
         }
     }
 }
Esempio n. 2
0
 private void FixupD_STATE(D_STATE previousValue)
 {
     if (D_STATE != null)
     {
         if (StateID != D_STATE.ID)
         {
             StateID = D_STATE.ID;
         }
     }
 }
        private void LoadDDLs(int? selectedCity, int? selectedType)
        {
            try
            {
                D_STATE state = new D_STATE() { ID = Configuration.State };
                List<D_CITY> cities = ApplicationContext.Current.Customers.GetCities(state);
                //D_CITY emptyCity = new D_CITY() { ID = -1, Name = "" };
                //cities.Insert(0, emptyCity);
                ddlCities.DataSource = cities;
                ddlCities.DataValueField = "ID";
                ddlCities.DataTextField = "Name";
                if (selectedCity.HasValue)
                {
                    ddlCities.SelectedValue = selectedCity.Value.ToString();
                }
                ddlCities.DataBind();

                List<D_ADDRESS_TYPE> types = ApplicationContext.Current.Customers.GetAddressTypeList();
                //D_ADDRESS_TYPE emptyType = new D_ADDRESS_TYPE() { ID = -1, Name = "" };
                //types.Insert(0, emptyType);
                ddlAddrType.DataSource = types;
                ddlAddrType.DataValueField = "ID";
                ddlAddrType.DataTextField = "Name";
                if (selectedType.HasValue)
                {
                    ddlAddrType.SelectedValue = selectedType.Value.ToString();
                }
                ddlAddrType.DataBind();
            }
            catch (Exception ex)
            {
                BasePage.Log(ex, ex.Message, ex.StackTrace, "CustomerAddress.LoadDDL");
                writeError(ex.Message);
            }
        }
Esempio n. 4
0
 public List<D_CITY> GetCities(D_STATE State)
 {
     List<D_CITY> cities;
     if (State != null)
     {
         cities = Context.D_CITY.Where(x => x.StateID == State.ID).ToList();
     }
     else
     {
         cities = Context.D_CITY.ToList();
     }
     return cities;
 }
 public List<D_CITY> GetCities(D_STATE State)
 {
     return _customerDAO.GetCities(State);
 }