Esempio n. 1
0
        public void Fill()
        {
            DataTable dataTable = City_DAL.GetDataTable();
            City      city      = new City();
            DataRow   dataRow;

            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                dataRow = dataTable.Rows[i];

                city = new City(dataRow);

                this.Add(city);
            }
        }
Esempio n. 2
0
        public Guid InsertUpdateRecord(City objCity)
        {
            Guid objReturn = new Guid();

            try
            {
                using (City_DAL objDAL = new City_DAL())
                {
                    objReturn = objDAL.InsertUpdateRecord(objCity);
                }
            }
            catch (Exception ex)
            {
                log.Error("InsertUpdateRecord Error: ", ex);
            }
            return(objReturn);
        }
Esempio n. 3
0
        public City Validate(string email, string password)
        {
            City objReturn = null;

            try
            {
                using (City_DAL objDAL = new City_DAL())
                {
                    objReturn = objDAL.Validate(email, password);
                }
            }
            catch (Exception ex)
            {
                log.Error("Validate Error: ", ex);
            }
            return(objReturn);
        }
Esempio n. 4
0
        public City GetRecordById(Guid iId)
        {
            City objReturn = null;

            try
            {
                using (City_DAL objDAL = new City_DAL())
                {
                    objReturn = objDAL.GetRecordById(iId);
                }
            }
            catch (Exception ex)
            {
                log.Error("GetRecordById Error: ", ex);
            }
            return(objReturn);
        }
Esempio n. 5
0
        public CityPage GetRecordPage(int iPageNo, int iPageSize)
        {
            CityPage objReturn = new CityPage();

            try
            {
                using (City_DAL objDAL = new City_DAL())
                {
                    objReturn = objDAL.GetRecordPage(iPageNo, iPageSize);
                }
            }
            catch (Exception ex)
            {
                log.Error("GetRecordPage Error: ", ex);
            }
            return(objReturn);
        }
Esempio n. 6
0
        public List <City> GetAllRecord()
        {
            List <City> objReturn = null;

            try
            {
                using (City_DAL objDAL = new City_DAL())
                {
                    objReturn = objDAL.GetAllRecord();
                }
            }
            catch (Exception ex)
            {
                log.Error("GetAllRecord Error: ", ex);
            }
            return(objReturn);
        }
Esempio n. 7
0
        public bool DeleteRecord(int iId)
        {
            bool objReturn = false;

            try
            {
                using (City_DAL objDAL = new City_DAL())
                {
                    objReturn = objDAL.DeleteRecord(iId);
                }
            }
            catch (Exception ex)
            {
                log.Error("DeleteRecord Error: ", ex);
            }
            return(objReturn);
        }
Esempio n. 8
0
        public void Fill()
        {
            //להביא מה-DAL טבלה מלאה בכל הלקוחות

            DataTable dataTable = City_DAL.GetDataTable();

            //להעביר את הערכים מהטבלה לתוך אוסף הלקוחות
            //להעביר כל שורה בטבלה ללקוח

            DataRow dataRow;
            City    city;

            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                dataRow = dataTable.Rows[i];
                city    = new City(dataRow);
                this.Add(city);
            }
        }