Beispiel #1
0
 public void Delete(DaysOfTurnML daysOfTurn)
 {
     try
     {
         DaysOfTurnDAL.Delete(daysOfTurn);
     }
     catch (Exception ex)
     {
         throw new Exception(String.Format("{0}.Delete: {1}", core, ex));
     }
 }
Beispiel #2
0
 public int Save(DaysOfTurnML daysOfTurn)
 {
     try
     {
         if (daysOfTurn.Id == 0)
         {
             return(DaysOfTurnDAL.Save(daysOfTurn));
         }
         else
         {
             return(DaysOfTurnDAL.Update(daysOfTurn));
         }
     }
     catch (Exception ex)
     {
         throw new Exception(String.Format("{0}.Save: {1}", core, ex));
     }
 }
Beispiel #3
0
 public int Save(DaysOfTurnML DaysOfTurn)
 {
     try
     {
         ModelDAL      ModelDAL = new ModelDAL();
         String        Response = ModelDAL.InsertModel(DaysOfTurn, TableName, IdUserSession);
         SqlConnection Conexion = new SqlConnection
         {
             ConnectionString = ConnectionString
         };
         Conexion.Open();
         SqlCommand cmd2 = new SqlCommand(Response.ToString(), Conexion);
         return(cmd2.ExecuteNonQuery());
     }
     catch (Exception ex)
     {
         throw new Exception(String.Format("{0}.save : {1}", core, ex));
     }
 }
Beispiel #4
0
 public void Delete(DaysOfTurnML DaysOfTurn)
 {
     try
     {
         ModelDAL      ModelDAL = new ModelDAL();
         String        Response = ModelDAL.DeleteModel(DaysOfTurn, TableName, IdUserSession);
         SqlConnection Conexion = new SqlConnection()
         {
             ConnectionString = ConnectionString
         };
         Conexion.Open();
         SqlCommand cmd2 = new SqlCommand(Response.ToString(), Conexion);
         cmd2.ExecuteNonQuery();
         Conexion.Close();
     }
     catch (Exception ex)
     {
         throw new Exception(String.Format("{0}.delete: {1}", core, ex));
     }
 }