public DataTable SelectAll(EntityHandler.UserRoles obj) { DataTable dt = new DataTable(); try { string SqlCommand = ""; dt = new DALBase().Select(SqlCommand); } catch (Exception ex) { } return(dt); }
public bool Delete(EntityHandler.UserRoles obj) { bool Status = false; try { string SqlCommand = ""; Status = new DALBase().Update(SqlCommand); } catch (Exception ex) { } return(Status); }
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); }
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); }
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; }