예제 #1
0
        public IQueryable <State> FindBy(System.Linq.Expressions.Expression <Func <State, bool> > predicate)
        {
            StateDAL           dalObject = new StateDAL();
            IQueryable <State> results   = dalObject.FindBy(predicate);

            return(results);
        }
예제 #2
0
        private void BindState()
        {
            int stateId = Request.QueryString["StateId"].ToInt();

            if (stateId > 0)
            {
                State stateLookup = StateDAL.GetItem(stateId);

                if (stateLookup != null)
                {
                    lblStateId.Text           = stateLookup.StateId.ToString();
                    lblStateName.Text         = stateLookup.StateName;
                    lblStateAbbreviation.Text = stateLookup.StateAbbreviation.ToString();
                }

                else
                {
                    lblMessage.Text = "State could not be found.";
                }
            }
            else
            {
                lblMessage.Text = "Invalid ID. State record could not be found.";
            }
        }
예제 #3
0
        public IQueryable <State> GetAll()
        {
            StateDAL           dalObject = new StateDAL();
            IQueryable <State> results   = dalObject.GetAll();

            return(results);
        }
예제 #4
0
        public List <StateDO> GetStates(int CountryId)
        {
            List <StateDO> obj    = new List <StateDO>();
            StateDAL       objDal = new StateDAL();

            obj = objDal.GetStates(CountryId);
            return(obj);
        }
예제 #5
0
        public frmCity()
        {
            InitializeComponent();
            DALObject = new DAL.City.CityDAL();
            StateDAL  = new StateDAL();

            FirstControl = txtCityName;
        }
예제 #6
0
        private void BindStateList()
        {
            StateCollection stateList = new StateCollection();

            stateList = StateDAL.GetCollection();

            rptStateList.DataSource = stateList;
            rptStateList.DataBind();
        }
예제 #7
0
 void LookupCountry_EditValueChanged(object sender, EventArgs e)
 {
     if (LookupCountry.EditValue == null)
     {
         LookupState.Properties.DataSource = null;
     }
     else
     {
         StateDAL StateDAL = new StateDAL();
         LookupState.Properties.DataSource = StateDAL.GetLookupList((int)LookupCountry.EditValue);
     }
 }
예제 #8
0
        public Boolean Delete(SqlInt32 CategoryID)
        {
            StateDAL dalState = new StateDAL();

            if (dalState.Delete(CategoryID))
            {
                return(true);
            }
            else
            {
                Message = dalState.Message;
                return(false);
            }
        }
예제 #9
0
        public Boolean Update(StateENT entState)
        {
            StateDAL dalState = new StateDAL();

            if (dalState.Update(entState))
            {
                return(true);
            }
            else
            {
                Message = dalState.Message;
                return(false);
            }
        }
예제 #10
0
        public List <StateMaster> GetData(StateMasterFilter objFilter, bool prevFilter = false)
        {
            StateDAL objStateDAL = null;

            try
            {
                objStateDAL = new StateDAL();
                SetStateFilter(objFilter, prevFilter);
                return(objStateDAL.Get(objFilter));
            }
            catch (Exception ex)
            {
                throw;
            }
            finally
            {
                objStateDAL = null;
            }
        }
예제 #11
0
        public Response SaveState(StateMaster state, string CRUDAction)
        {
            StateDAL objStateDAL = null;
            Response objResponse;
            string   ErrorCode = "";

            try
            {
                objStateDAL = new StateDAL();
                objStateDAL.Save(state, CRUDAction, out ErrorCode);
                objResponse.ErrorCode   = ErrorCode;
                objResponse.Description = "";
            }
            catch (Exception ex)
            {
                throw;
            }
            finally
            {
                objStateDAL = null;
            }
            return(objResponse);
        }
 //returns a list of the states
 public List <US_State> GetStates()
 {
     return(StateDAL.GetStates());
 }
예제 #13
0
        public StateENT SelectByPK(SqlInt32 StateID)
        {
            StateDAL dalState = new StateDAL();

            return(dalState.SelectByPK(StateID));
        }
예제 #14
0
        public DataTable SelectForDropDownList()
        {
            StateDAL dalState = new StateDAL();

            return(dalState.SelectForDropDownList());
        }
예제 #15
0
        public DataTable SelectAll()
        {
            StateDAL dalState = new StateDAL();

            return(dalState.SelectAll());
        }
예제 #16
0
 public StateBLL()
 {
     Dal = new StateDAL();
 }
예제 #17
0
        public void Add(State entity)
        {
            StateDAL dalObject = new StateDAL();

            dalObject.Add(entity);
        }
예제 #18
0
        public DataTable LoadState()
        {
            StateDAL state = new StateDAL();

            return(state.LoadState());
        }
예제 #19
0
        public void Delete(int id)
        {
            StateDAL dalObject = new StateDAL();

            dalObject.Delete(id);
        }
예제 #20
0
        public void Edit(State entity)
        {
            StateDAL dalObject = new StateDAL();

            dalObject.Edit(entity);
        }