public IQueryable <City> GetAll() { CityDAL dalObject = new CityDAL(); IQueryable <City> results = dalObject.GetAll(); return(results); }
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; } }
static public List <City> GetAllBind() { DataTable dt = CityDAL.GetAll(); List <City> CitiesList = GenericConvertDataTableToList.ConvertDataTable <City>(dt); return(CitiesList); }
/// <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(); }
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)); }
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(); } }
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(); }
public Boolean Delete(SqlInt32 CategoryID) { CityDAL dalCity = new CityDAL(); if (dalCity.Delete(CategoryID)) { return(true); } else { Message = dalCity.Message; return(false); } }
public Boolean Update(CityENT entCity) { CityDAL dalCity = new CityDAL(); if (dalCity.Update(entCity)) { return(true); } else { Message = dalCity.Message; return(false); } }
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; } }
/// <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(); } } }
/// <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(); } } }
/// <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); }
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); }
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."; } }
static public DataRow GetById(int id) { return(CityDAL.GetById(id)); }
static public DataTable GetAll() { return(CityDAL.GetAll()); }
static CityBUL() { db = new CityDAL(); }
/// <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)); }
/// <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)); }
/// <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)); }
static public int Delete(int id) { return(CityDAL.Delete(id)); }
static public int Add(string country_name) { return(CityDAL.Add(country_name)); }
static public int Update(int id, string name) { return(CityDAL.Update(id, name)); }
/// <summary> /// 获取指定城市信息 /// </summary> /// <param name="id">ID</param> /// <returns>返回DataTable对象</returns> public static DataTable GetCityInfoByID(int id) { return(CityDAL.GetCityInfoByID(id)); }
public CityBAL() { _cityDal = new CityDAL(); }
/// <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)); }