예제 #1
0
        public DataTable SelectAll(EntityHandler.UserRoles obj)
        {
            DataTable dt = new DataTable();

            try
            {
                string SqlCommand = "";

                dt = new DALBase().Select(SqlCommand);
            }
            catch (Exception ex)
            { }
            return(dt);
        }
예제 #2
0
        public bool Delete(EntityHandler.UserRoles obj)
        {
            bool Status = false;

            try
            {
                string SqlCommand = "";

                Status = new DALBase().Update(SqlCommand);
            }
            catch (Exception ex)
            { }
            return(Status);
        }
예제 #3
0
        public List <EntityHandler.UserRoles> SelectAll(EntityHandler.UserRoles obj)
        {
            List <EntityHandler.UserRoles> listobj = new List <EntityHandler.UserRoles>();

            try
            {
                DataTable dt = new DataAccessHandler.UserRoles().SelectAll(obj);
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    listobj.Add(ConvertToObject(dt.Rows[i]));
                }
            }
            catch (Exception ex)
            { }
            return(listobj);
        }
예제 #4
0
        private EntityHandler.UserRoles ConvertToObject(DataRow row)
        {
            EntityHandler.UserRoles obj = new EntityHandler.UserRoles();
            try
            {
                obj.UserID = row["UserID"].ToString();
                obj.RoleID = row["RoleID"].ToString();
                obj.HostID = row["HostID"].ToString();

                obj.ModifiedDate = Convert.ToDateTime(row["ModifiedDate"].ToString());
                obj.ModifiedUser = Convert.ToInt32(row["ModifiedUser"].ToString());
                obj.CreatedDate  = Convert.ToDateTime(row["CreatedDate"].ToString());
                obj.CreatedUser  = Convert.ToInt32(row["CreatedUser"].ToString());
            }
            catch (Exception ex)
            { }
            return(obj);
        }
예제 #5
0
        private EntityHandler.UserRoles ConvertToObject(DataRow row)
        {
            EntityHandler.UserRoles obj = new EntityHandler.UserRoles();
            try
            {

                obj.UserID = row["UserID"].ToString();
                obj.RoleID = row["RoleID"].ToString();
                obj.HostID = row["HostID"].ToString();

                obj.ModifiedDate = Convert.ToDateTime(row["ModifiedDate"].ToString());
                obj.ModifiedUser = Convert.ToInt32(row["ModifiedUser"].ToString());
                obj.CreatedDate = Convert.ToDateTime(row["CreatedDate"].ToString());
                obj.CreatedUser = Convert.ToInt32(row["CreatedUser"].ToString());

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