Example #1
0
 private EntityHandler.SubObjects ConvertToObject(DataRow row)
 {
     EntityHandler.SubObjects obj = new EntityHandler.SubObjects();
     try
     {
         obj.MainObjectCode = row["MainObjectCode"].ToString();
         obj.SubObjectCode  = row["SubObjectCode"].ToString();
     }
     catch (Exception ex)
     { }
     return(obj);
 }
Example #2
0
        public bool Delete(EntityHandler.SubObjects obj)
        {
            bool Status = false;

            try
            {
                Status = new DataAccessHandler.SubObjects().Delete(obj);
            }
            catch (Exception ex)
            { }
            return(Status);
        }
Example #3
0
        public DataTable SelectAll(EntityHandler.SubObjects obj)
        {
            DataTable dt = new DataTable();

            try
            {
                string SqlCommand = "";

                dt = new DALBase().Select(SqlCommand);
            }
            catch (Exception ex)
            { }
            return(dt);
        }
Example #4
0
        public bool Delete(EntityHandler.SubObjects obj)
        {
            bool Status = false;

            try
            {
                string SqlCommand = "";

                Status = new DALBase().Update(SqlCommand);
            }
            catch (Exception ex)
            { }
            return(Status);
        }
Example #5
0
        private EntityHandler.SubObjects ConvertToObject(DataRow row)
        {
            EntityHandler.SubObjects obj = new EntityHandler.SubObjects();
            try
            {

                obj.MainObjectCode = row["MainObjectCode"].ToString();
                obj.SubObjectCode = row["SubObjectCode"].ToString();
              

            }
            catch (Exception ex)
            { }
            return obj;
        }
Example #6
0
        public List <EntityHandler.SubObjects> SelectAll(EntityHandler.SubObjects obj)
        {
            List <EntityHandler.SubObjects> listobj = new List <EntityHandler.SubObjects>();

            try
            {
                DataTable dt = new DataAccessHandler.SubObjects().SelectAll(obj);
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    listobj.Add(ConvertToObject(dt.Rows[i]));
                }
            }
            catch (Exception ex)
            { }
            return(listobj);
        }