コード例 #1
0
ファイル: CityBAL.cs プロジェクト: Anand8399/digiSMS
        public IQueryable <City> GetAll()
        {
            CityDAL           dalObject = new CityDAL();
            IQueryable <City> results   = dalObject.GetAll();

            return(results);
        }
コード例 #2
0
ファイル: CityBAL.cs プロジェクト: Anand8399/digiSMS
        public IQueryable <City> FindBy(System.Linq.Expressions.Expression <Func <City, bool> > predicate)
        {
            CityDAL           dalObject = new CityDAL();
            IQueryable <City> results   = dalObject.FindBy(predicate);

            return(results);
        }
コード例 #3
0
        // 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;
            }
        }
コード例 #4
0
ファイル: CityBLL.cs プロジェクト: MernaNashaat/Ado.Layers_C-
        static public List <City> GetAllBind()
        {
            DataTable   dt         = CityDAL.GetAll();
            List <City> CitiesList = GenericConvertDataTableToList.ConvertDataTable <City>(dt);

            return(CitiesList);
        }
コード例 #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);
        }
コード例 #6
0
 public Province_City_CarBLL()
 {
     pd  = new ProvinceDAL();
     cd  = new CityDAL();
     cbd = new CarBrandDAL();
     csd = new CarSystemDAL();
     ctd = new CarTypeDAL();
 }
コード例 #7
0
ファイル: CityList.aspx.cs プロジェクト: sjuhler131/Lottery
        private void BindCityList()
        {
            CityCollection cityList = new CityCollection();

            cityList = CityDAL.GetCollection();

            rptCityList.DataSource = cityList;
            rptCityList.DataBind();
        }
コード例 #8
0
        // 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));
        }
コード例 #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();
     }
 }
コード例 #10
0
ファイル: frmCompany.cs プロジェクト: ewin66/RAPH
        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();
        }
コード例 #11
0
        public Boolean Delete(SqlInt32 CategoryID)
        {
            CityDAL dalCity = new CityDAL();

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

            if (dalCity.Update(entCity))
            {
                return(true);
            }
            else
            {
                Message = dalCity.Message;
                return(false);
            }
        }
コード例 #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;
            }
        }
コード例 #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();
                }
            }
        }
コード例 #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();
                }
            }
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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.";
            }
        }
コード例 #19
0
ファイル: CityBLL.cs プロジェクト: MernaNashaat/Ado.Layers_C-
 static public DataRow GetById(int id)
 {
     return(CityDAL.GetById(id));
 }
コード例 #20
0
ファイル: CityBLL.cs プロジェクト: MernaNashaat/Ado.Layers_C-
 static public DataTable GetAll()
 {
     return(CityDAL.GetAll());
 }
コード例 #21
0
 static CityBUL()
 {
     db = new CityDAL();
 }
コード例 #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));
 }
コード例 #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));
 }
コード例 #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));
 }
コード例 #25
0
ファイル: CityBLL.cs プロジェクト: MernaNashaat/Ado.Layers_C-
 static public int Delete(int id)
 {
     return(CityDAL.Delete(id));
 }
コード例 #26
0
ファイル: CityBLL.cs プロジェクト: MernaNashaat/Ado.Layers_C-
 static public int Add(string country_name)
 {
     return(CityDAL.Add(country_name));
 }
コード例 #27
0
ファイル: CityBLL.cs プロジェクト: MernaNashaat/Ado.Layers_C-
 static public int Update(int id, string name)
 {
     return(CityDAL.Update(id, name));
 }
コード例 #28
0
 /// <summary>
 /// 获取指定城市信息
 /// </summary>
 /// <param name="id">ID</param>
 /// <returns>返回DataTable对象</returns>
 public static DataTable GetCityInfoByID(int id)
 {
     return(CityDAL.GetCityInfoByID(id));
 }
コード例 #29
0
 public CityBAL()
 {
     _cityDal = new CityDAL();
 }
コード例 #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));
 }