示例#1
0
        public bool Delete(EntityHandler.Objects obj)
        {
            bool Status = false;

            try
            {
                Status = new DataAccessHandler.Objects().Delete(obj);
            }
            catch (Exception ex)
            { }
            return(Status);
        }
示例#2
0
        public DataTable SelectAll(EntityHandler.Objects obj)
        {
            DataTable dt = new DataTable();

            try
            {
                string SqlCommand = "";

                dt = new DALBase().Select(SqlCommand);
            }
            catch (Exception ex)
            { }
            return(dt);
        }
示例#3
0
        public bool Delete(EntityHandler.Objects obj)
        {
            bool Status = false;

            try
            {
                string SqlCommand = "";

                Status = new DALBase().Update(SqlCommand);
            }
            catch (Exception ex)
            { }
            return(Status);
        }
示例#4
0
        public List <EntityHandler.Objects> SelectAll(EntityHandler.Objects obj)
        {
            List <EntityHandler.Objects> listobj = new List <EntityHandler.Objects>();

            try
            {
                DataTable dt = new DataAccessHandler.Objects().SelectAll(obj);
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    listobj.Add(ConvertToObject(dt.Rows[i]));
                }
            }
            catch (Exception ex)
            { }
            return(listobj);
        }
示例#5
0
 private EntityHandler.Objects ConvertToObject(DataRow row)
 {
     EntityHandler.Objects obj = new EntityHandler.Objects();
     try
     {
         obj.ListOrdering   = Convert.ToInt32(row["ListOrdering"].ToString());
         obj.ObjectCode     = row["ObjectCode"].ToString();
         obj.ObjectFileName = row["ObjectFileName"].ToString();
         obj.Description    = row["Description"].ToString();
         obj.LevelType      = Convert.ToInt32(row["LevelType"].ToString());
         obj.HostID         = row["HostID"].ToString();
         obj.CreateUser     = Convert.ToInt32(row["CreateUser"].ToString());
         obj.CreateDate     = Convert.ToDateTime(row["CreateDate"].ToString());
         obj.ModifiedDate   = Convert.ToDateTime(row["ModifiedDate"].ToString());
         obj.ModifiedUser   = Convert.ToInt32(row["ModifiedUser"].ToString());
         obj.Status         = Convert.ToInt32(row["Status"].ToString());
     }
     catch (Exception ex)
     { }
     return(obj);
 }
示例#6
0
        private EntityHandler.Objects ConvertToObject(DataRow row)
        {
            EntityHandler.Objects obj = new EntityHandler.Objects();
            try
            {
                obj.ListOrdering = Convert.ToInt32(row["ListOrdering"].ToString());
                obj.ObjectCode = row["ObjectCode"].ToString();
                obj.ObjectFileName = row["ObjectFileName"].ToString();
                obj.Description = row["Description"].ToString();
                obj.LevelType = Convert.ToInt32(row["LevelType"].ToString());
                obj.HostID = row["HostID"].ToString();
                obj.CreateUser = Convert.ToInt32(row["CreateUser"].ToString());
                obj.CreateDate = Convert.ToDateTime(row["CreateDate"].ToString());
                obj.ModifiedDate = Convert.ToDateTime(row["ModifiedDate"].ToString());
                obj.ModifiedUser = Convert.ToInt32(row["ModifiedUser"].ToString());
                obj.Status = Convert.ToInt32(row["Status"].ToString());


            }
            catch (Exception ex)
            { }
            return obj;
        }