public object UpdateStandard([FromBody] StandardParam StdParam) { StandardMaster Edit = new StandardMaster(); var result = Edit.UpdateStandard(StdParam); return(result); }
public object DeleteStandard([FromBody] StandardParam StdParam) { StandardMaster Delete = new StandardMaster(); var result = Delete.DeleteStandard(StdParam); return(result); }
public object GetSingleStandard([FromBody] StandardParam StdParam) { StandardMaster obj = new StandardMaster(); var result = obj.GetSingleStandard(StdParam); return(result); }
public object DisplayStandard([FromBody] StandardParam StdParam) { StandardMaster Save = new StandardMaster(); var result = Save.GetStandardInfo(StdParam); return(result); }
public object SaveStandard([FromBody] StandardParam StdParam) { StandardMaster Save = new StandardMaster(); var result = Save.AddStandard(StdParam); return(result); }
public long Save(StandardMaster master) { if (master.StandardId == 0) { db.StandardMasters.Add(master); } db.SaveChanges(); return(master.StandardId); }
public bool Delete(long id) { StandardMaster master = GetStandardMasterById(id); if (master != null) { db.StandardMasters.Remove(master); db.SaveChanges(); return(true); } else { return(false); } }
public static StandardMasterModel Mapping(StandardMaster db) { StandardMasterModel model = new StandardMasterModel(); model.StandardId = db.StandardId; model.Standard = db.Standard; model.IsActive = db.IsActive; model.IsDelete = db.IsDelete; model.CreatedBy = db.CreatedBy; model.CreatedOn = db.CreatedOn; model.UpdatedBy = db.UpdatedBy; model.UpdatedOn = db.UpdatedOn; return(model); }
public async Task <CommonResponce> GetStandardByStandardName(string StandardName) { bool isValid = true; StandardMaster StdMaster = null; var oStandard = await _DBStandardMasterRepository.GetStandardByStandardName(StandardName); if (oStandard != null) { StdMaster = _mapper.Map <StandardMaster>(StdMaster); } else { isValid = false; } CommonResponce result = new CommonResponce { Stat = isValid, StatusMsg = (isValid ? "" : "Invalid Standard Name"), StatusObj = StdMaster }; return(result); }
public async Task <IActionResult> UpdateStandard(int Id) { CreateBreadCrumb(new[] { new { Name = "Home", ActionUrl = "#" }, new { Name = "Student", ActionUrl = "/StandardMaster/UpdateStandard" } }); BaseViewModel VModel = null; CommonResponce CR = await _StandardMasterService.GetStandardByStandardId(Id); if (CR.Stat) { StandardMaster oStandardMaster = (StandardMaster)CR.StatusObj; var TempVModel = new StandardMasterVM { Id = oStandardMaster.Id, Name = oStandardMaster.Name }; //var TempVModel = new StudentProfileVM(); VModel = await GetViewModel(TempVModel); } //*****get user avtar************ /* * string UsrImgPath = string.Format("{0}\\{1}.{2}", Path.Combine(GetBaseService().GetAppRootPath(), "AppFileRepo\\UserAvatar"), CurrentUserInfo.UserID, "jpg"); * if (System.IO.File.Exists(UsrImgPath)) * { * UsrImgPath = string.Format("~/AppFileRepo/UserAvatar/{0}.{1}", CurrentUserInfo.UserID, "jpg"); * } * else * { * if (CurrentUserInfo.UserGender.Equals("M")) * UsrImgPath = "~/img/avatar5.png"; * else * UsrImgPath = "~/img/avatar3.png"; * } */ //******************************* return(View("~/Views/Master/UpdateStandard.cshtml", VModel)); }