コード例 #1
0
 public static List <Matter> GetMattersByCompanyID(int CompanyID)
 {
     using (var db = new LawyersEntities())
     {
         return(db.Matters.Where(x => x.CompanyID == CompanyID).OrderBy(x => x.Name).ToList());
     }
 }
コード例 #2
0
 public static List <Company> GetCompanies()
 {
     using (var db = new LawyersEntities())
     {
         return(db.Companies.OrderBy(x => x.Name).ToList());
     }
 }
コード例 #3
0
 public static List <Matter> GetMatters()
 {
     using (var db = new LawyersEntities())
     {
         return(db.Matters.OrderBy(x => x.Name).ToList());
     }
 }
コード例 #4
0
 public static List <Submatter> GetSubmattersByMatterID(int MatterID)
 {
     using (var db = new LawyersEntities())
     {
         return(db.Submatters.Where(x => x.MatterID == MatterID).OrderBy(x => x.Name).ToList());
     }
 }
コード例 #5
0
 public static List <sp_GetAllTasks_Result> GetTasksWithInfo()
 {
     using (var db = new LawyersEntities())
     {
         return(db.sp_GetAllTasks().OrderBy(x => x.CompanyName).ToList());
     }
 }
コード例 #6
0
 public static List <Task> GetTasks()
 {
     using (var db = new LawyersEntities())
     {
         return(db.Tasks.OrderBy(x => x.Date).ToList());
     }
 }
コード例 #7
0
 public static List <Lawyer> GetLawyers()
 {
     try
     {
         using (var db = new LawyersEntities())
         {
             return(db.Lawyers.OrderBy(x => x.Name).ToList());
         }
     }
     catch
     {
         throw;
     }
 }
コード例 #8
0
 public void Add()
 {
     try
     {
         using (var db = new LawyersEntities())
         {
             db.Companies.Attach(this);
             db.Companies.Add(this);
             db.SaveChanges();
         }
     }
     catch
     {
         throw;
     }
 }