Beispiel #1
0
 public string Edit(DBConnectionString.ClassRoom objClass, string token)
 {
     try
     {
         if (ModelState.IsValid)
         {
             objClass.ModifiedBy = _userStatistics.UserId;
             objClass.ModifiedOn = DateTime.Now;
             if (objClass.Update() > 0)
             {
                 SaveFiles(token, this.GetType().Name, objClass.ClassRoomId);
                 return Convert.ToString(true);
             }
             return Convert.ToString(false);
         }
         return Convert.ToString(false);
     }
     catch (Exception ex)
     {
         return ex.Message.ToString();
     }
 }
 public string Edit(DBConnectionString.Organization organization, string token)
 {
     try
     {
         if (ModelState.IsValid)
         {
             organization.ModifiedBy = _userStatistics.UserId;
             organization.ModifiedDate = DateTime.Now;
             if (organization.Update() > 0)
             {
                 SaveFiles(token, this.GetType().Name, organization.OrganizationId);
                 return Convert.ToString(true);
             }
             return Convert.ToString(false);
         }
         return Convert.ToString(false);
     }
     catch (Exception ex)
     {
         return ex.Message.ToString();
     }
 }
Beispiel #3
0
 public string Edit(DBConnectionString.Class objClass)
 {
     try
     {
         if (ModelState.IsValid)
         {
             objClass.ModifiedBy = _userStatistics.UserId;
             objClass.ModifiedOn = DateTime.Now;
             if (objClass.Update() > 0)
             {
                 return Convert.ToString(true);
             }
             return Convert.ToString(false);
         }
         return Convert.ToString(false);
     }
     catch (Exception ex)
     {
         return ex.Message.ToString();
     }
 }
Beispiel #4
0
 public bool UpdateTeacherSubjects(DBConnectionString.TeacherSubject teacher)
 {
     int recAffected = teacher.Update();
     if (recAffected > 0)
     {
         return true;
     }
     return false;
 }