public Result InsertBrandingMonitoringTeamInfo(tblBrandingMonitoringTeam brandingMonitoringTeam) { var result = new Result(); try { result.IsSuccess = iBrandingTeam.InsertBrandingMonitoringTeamInfo(brandingMonitoringTeam); } catch (Exception ex) { throw ex; } return(result); }
public bool InsertBrandingMonitoringTeamInfo(tblBrandingMonitoringTeam brandingMonitoringTeam) { try { _entities.tblBrandingMonitoringTeams.Add(brandingMonitoringTeam); _entities.SaveChanges(); return(true); } catch (Exception exception) { throw exception; } }
public JsonResult UpadteBrandingMonitoringTeamInfo(tblBrandingMonitoringTeam brandingMonitoringInfo, string type) { var result = new Result(); if (type == "E") { brandingMonitoringInfo.Updateddate = DateTime.Now; result = _brandingTeamManager.UpadteBrandingMonitoringTeamInfo(brandingMonitoringInfo); } else { brandingMonitoringInfo.DeletedDate = DateTime.Now; result = _brandingTeamManager.UpadteBrandingMonitoringTeamInfo(brandingMonitoringInfo); } return(Json(result)); }
public JsonResult InsertBrandingMonitoringTeamInfo(tblBrandingMonitoringTeam brandingMonitoringTeam) { var result = new Result(); brandingMonitoringTeam.AddedDate = DateTime.Now; brandingMonitoringTeam.Active = true; try { result = _brandingTeamManager.InsertBrandingMonitoringTeamInfo(brandingMonitoringTeam); } catch (Exception ex) { throw ex; } return(Json(result)); }
public bool UpadteBrandingMonitoringTeamInfo(tblBrandingMonitoringTeam brandingMonitoringInfo) { tblBrandingMonitoringTeam brandingMonitoringInfoes = _entities.tblBrandingMonitoringTeams.FirstOrDefault(x => x.Id == brandingMonitoringInfo.Id); if (brandingMonitoringInfo != null) { if (brandingMonitoringInfo.Name != null) { if (brandingMonitoringInfoes != null) { brandingMonitoringInfoes.Name = brandingMonitoringInfo.Name; } } if (brandingMonitoringInfo.EmployeeId != null) { if (brandingMonitoringInfoes != null) { brandingMonitoringInfoes.EmployeeId = brandingMonitoringInfo.EmployeeId; } } if (brandingMonitoringInfo.MobileNumber != null) { if (brandingMonitoringInfoes != null) { brandingMonitoringInfoes.MobileNumber = brandingMonitoringInfo.MobileNumber; } } if (brandingMonitoringInfo.Email != null) { if (brandingMonitoringInfoes != null) { brandingMonitoringInfoes.Email = brandingMonitoringInfo.Email; } } if (brandingMonitoringInfo.Active != null) { if (brandingMonitoringInfoes != null) { brandingMonitoringInfoes.Active = brandingMonitoringInfo.Active; } } if (brandingMonitoringInfo.Updateddate != null) { if (brandingMonitoringInfoes != null) { brandingMonitoringInfoes.Updateddate = brandingMonitoringInfo.Updateddate; } } if (brandingMonitoringInfo.DeletedDate != null) { if (brandingMonitoringInfoes != null) { brandingMonitoringInfoes.DeletedDate = brandingMonitoringInfo.DeletedDate; } } _entities.Entry(brandingMonitoringInfoes).State = EntityState.Modified; _entities.SaveChanges(); } else { return(false); } return(true); }