Example #1
0
        public static string GetRegionName()
        {
            DataTable dt = RegionDL.GetRegionList();
            DataRow   dr = dt.Rows[0];

            return(dr["name"].ToString());
        }
 internal int Delete()
 {
     try
     {
         using (RegionDL _regiondlDL = new RegionDL())
         {
             return(_regiondlDL.Delete(this));
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 internal int InsertAndGetId()
 {
     try
     {
         using (RegionDL _regiondlDL = new RegionDL())
         {
             return(_regiondlDL.InsertAndGetId(this));
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #4
0
        public static List <Region> GetRegionList()
        {
            List <Region> regions = new List <Region>();

            DataTable dt = RegionDL.GetRegionList();

            foreach (DataRow dr in dt.Rows)
            {
                Region Region = new Region();
                Region.RegionID   = Convert.ToInt16(dr["ID"].ToString());
                Region.RegionName = dr["name"].ToString();

                regions.Add(Region);
            }
            return(regions);
        }