Beispiel #1
0
        public IQueryable <City> GetAll()
        {
            CityDAL           dalObject = new CityDAL();
            IQueryable <City> results   = dalObject.GetAll();

            return(results);
        }
Beispiel #2
0
        public IQueryable <City> FindBy(System.Linq.Expressions.Expression <Func <City, bool> > predicate)
        {
            CityDAL           dalObject = new CityDAL();
            IQueryable <City> results   = dalObject.FindBy(predicate);

            return(results);
        }
        // GET: User
        public ActionResult Details()
        {
            CommonBL objCommonBL = null;

            try
            {
                objDetailsVM = new CityDetailsVM();
                objCommonBL  = new CommonBL();

                CityDAL obj = new CityDAL();
                //var query = CityDAL.GetCountry();
                objDetailsVM.CntMst = Chikitsa.DataAccessLayer.StateDAL.GetCountry();

                //objDetailsVM.CntMstr.Status = true;
                //objDetailsVM.lstUserTypes = objCommonBL.GetCodeDetail(new CodeDetailFilter() { CodeTypeId = 1 });
                return(View(objDetailsVM));
            }
            catch (Exception ex)
            {
                throw;
            }
            finally
            {
                objCommonBL = null;
            }
        }
Beispiel #4
0
        static public List <City> GetAllBind()
        {
            DataTable   dt         = CityDAL.GetAll();
            List <City> CitiesList = GenericConvertDataTableToList.ConvertDataTable <City>(dt);

            return(CitiesList);
        }
Beispiel #5
0
        /// <summary>
        /// Deletes Record from Database.
        /// </summary>
        /// <param name="objCity">Object containing all data values.</param>
        /// <returns>boolean value True if Record is deleted successfully
        /// otherwise returns False.</returns>
        public static bool Delete(City objCity)
        {
            bool recDel;

            recDel = CityDAL.Delete(objCity.DBID);
            return(recDel);
        }
 public Province_City_CarBLL()
 {
     pd  = new ProvinceDAL();
     cd  = new CityDAL();
     cbd = new CarBrandDAL();
     csd = new CarSystemDAL();
     ctd = new CarTypeDAL();
 }
Beispiel #7
0
        private void BindCityList()
        {
            CityCollection cityList = new CityCollection();

            cityList = CityDAL.GetCollection();

            rptCityList.DataSource = cityList;
            rptCityList.DataBind();
        }
        // GET: Test
        public ActionResult Index()
        {
            string connectionString = ConfigurationManager
                                      .ConnectionStrings["LiteCommerceDB"]
                                      .ConnectionString;

            ICityDAL dal  = new CityDAL(connectionString);
            var      data = dal.List();

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Beispiel #9
0
 void LookupState_EditValueChanged(object sender, EventArgs e)
 {
     if (LookupCountry.EditValue == null)
     {
         LookupCity.Properties.DataSource = null;
     }
     else
     {
         CityDAL CityDAL = new CityDAL();
         LookupCity.Properties.DataSource = CityDAL.GetLookupList();
     }
 }
Beispiel #10
0
        public frmCompany()
        {
            InitializeComponent();

            FirstControl = txtCompanyName;

            DALObject = new CompanyDAL();
            CityDAL   = new DAL.City.CityDAL();

            PayrollMonthDAL = new PayrollMonthDAL();
            //CitySelection = new CitySelection(lookupCountry, lookupState, lookupCity, this.ErrorProvider);
            CurrencyDALObj = new DAL.SubMaster.CurrencyDAL();
        }
Beispiel #11
0
        public Boolean Delete(SqlInt32 CategoryID)
        {
            CityDAL dalCity = new CityDAL();

            if (dalCity.Delete(CategoryID))
            {
                return(true);
            }
            else
            {
                Message = dalCity.Message;
                return(false);
            }
        }
Beispiel #12
0
        public Boolean Update(CityENT entCity)
        {
            CityDAL dalCity = new CityDAL();

            if (dalCity.Update(entCity))
            {
                return(true);
            }
            else
            {
                Message = dalCity.Message;
                return(false);
            }
        }
Beispiel #13
0
        public List <CityMaster> GetData(CityMasterFilter objFilter, bool prevFilter = false)
        {
            CityDAL objCityDAL = null;

            try
            {
                objCityDAL = new CityDAL();
                SetStateFilter(objFilter, prevFilter);
                return(objCityDAL.Get(objFilter));
            }
            catch (Exception ex)
            {
                throw;
            }
            finally
            {
                objCityDAL = null;
            }
        }
Beispiel #14
0
        /// <summary>
        /// Date Created: 02/08/2011
        /// Created By: Marco Abejar
        /// (description) Selecting City List based on Country ID
        /// </summary>
        public static DataTable CityListbyCountry(Int32 CountryID)
        {
            DataTable dt = null;

            try
            {
                dt = CityDAL.CityListbyCountry(CountryID);
                return(dt);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (dt != null)
                {
                    dt.Dispose();
                }
            }
        }
Beispiel #15
0
        /// <summary>
        /// Date Created:   07/10/2011
        /// Created By:     Josephine Gad
        /// (description)   Get City List By country ID
        /// ---------------------------------------------
        /// </summary>
        /// <param name="CountryID"></param>
        /// <returns></returns>
        public static DataTable GetCityByCountry(string CountryID, string CityName, string cityInitial)
        {
            DataTable dt = null;

            try
            {
                dt = CityDAL.GetCityByCountry(CountryID, CityName, cityInitial);
                return(dt);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (dt != null)
                {
                    dt.Dispose();
                }
            }
        }
Beispiel #16
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="objPOType"></param>
        /// <returns></returns>
        public static bool Save(City objCity, User objUser)
        {
            bool flgSave;

            try
            {
                using (TransactionScope objTScope = new TransactionScope(TransactionScopeOption.RequiresNew))
                {
                    if (objCity.IsEdited || objCity.IsNew)
                    {
                        CityDAL.Save(objCity, objUser);
                    }
                    flgSave = true;
                    objTScope.Complete();
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(flgSave);
        }
Beispiel #17
0
        public Response SaveState(CityMaster city, string CRUDAction)
        {
            CityDAL  objCityDAL = null;
            Response objResponse;
            string   ErrorCode = "";

            try
            {
                objCityDAL = new CityDAL();
                objCityDAL.Save(city, CRUDAction, out ErrorCode);
                objResponse.ErrorCode   = ErrorCode;
                objResponse.Description = "";
            }
            catch (Exception ex)
            {
                throw;
            }
            finally
            {
                objCityDAL = null;
            }
            return(objResponse);
        }
Beispiel #18
0
        private void BindCity()
        {
            int cityId = Request.QueryString["CityId"].ToInt();

            if (cityId > 0)
            {
                City cityLookup = CityDAL.GetItem(cityId);

                if (cityLookup != null)
                {
                    lblCityId.Text   = cityLookup.CityId.ToString();
                    lblCityName.Text = cityLookup.CityName;
                }

                else
                {
                    lblMessage.Text = "Game could not be found.";
                }
            }
            else
            {
                lblMessage.Text = "Invalid ID. Game record could not be found.";
            }
        }
Beispiel #19
0
 static public DataRow GetById(int id)
 {
     return(CityDAL.GetById(id));
 }
Beispiel #20
0
 static public DataTable GetAll()
 {
     return(CityDAL.GetAll());
 }
Beispiel #21
0
 static CityBUL()
 {
     db = new CityDAL();
 }
Beispiel #22
0
 /// <summary>
 /// Judge the CityId whether has operation by Id before delete
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>Return the counts of the city by Id</returns>
 public static int CityIdWhetherHasOperation(int Id)
 {
     return(CityDAL.CityIdWhetherHasOperation(Id));
 }
Beispiel #23
0
 /// <summary>
 /// Judge the CityID whether exist by Id before delete or update
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>Return the counts of the city by Id</returns>
 public static int CityIdIsExist(int Id)
 {
     return(CityDAL.CityIdIsExist(Id));
 }
Beispiel #24
0
 /// <summary>
 /// 通过国家省份城市获取行数
 /// </summary>
 /// <param name="country">国家</param>
 /// <param name="province">省份</param>
 /// <param name="city">城市</param>
 /// <returns>返回通过省份城市获取行数</returns>
 public static int GetCityCityCountByCountryProvinceCity(string country, string province, string city, string xian)
 {
     return(CityDAL.GetCityCityCountByCountryProvinceCity(country, province, city, xian));
 }
Beispiel #25
0
 static public int Delete(int id)
 {
     return(CityDAL.Delete(id));
 }
Beispiel #26
0
 static public int Add(string country_name)
 {
     return(CityDAL.Add(country_name));
 }
Beispiel #27
0
 static public int Update(int id, string name)
 {
     return(CityDAL.Update(id, name));
 }
Beispiel #28
0
 /// <summary>
 /// 获取指定城市信息
 /// </summary>
 /// <param name="id">ID</param>
 /// <returns>返回DataTable对象</returns>
 public static DataTable GetCityInfoByID(int id)
 {
     return(CityDAL.GetCityInfoByID(id));
 }
Beispiel #29
0
 public CityBAL()
 {
     _cityDal = new CityDAL();
 }
Beispiel #30
0
 /// <summary>
 /// 通过省份获取省份行数
 /// </summary>
 /// <param name="country">国家</param>
 /// <param name="province">省份</param>
 /// <returns>返回通过省份获取城市的行数</returns>
 public static int GetCityProvinceCountByCountryProvince(string country, string province)
 {
     return(CityDAL.GetCityProvinceCountByCountryProvince(country, province));
 }