コード例 #1
0
 // GET: EmployeePositions
 public JsonResult Index()
 {
     return(Json(
                SQLConnectionHandler.GetInstance()
                .Execute(SQLCommand.SelectAllEmployeesPositions()).GetResult(),
                JsonRequestBehavior.AllowGet
                ));
 }
コード例 #2
0
 public bool Delete(EmployeePosition position)
 {
     if (position.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.DeleteEmployeesPositions(position), true);
     return(true);
 }
コード例 #3
0
 public static SQLConnectionHandler GetInstance()
 {
     if (instance == null)
     {
         lock (syncRoot)
         {
             if (instance == null)
             {
                 instance = new SQLConnectionHandler();
             }
         }
     }
     return(instance);
 }
コード例 #4
0
 public bool Insert(EmployeePosition position)
 {
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertEmployeesPositions(position), true);
     return(true);
 }