//Move Selected Shade public JsonResult MoveShade(int selectedId, int affectedId) { try { //selected shade ShadeCard oSelectedShade = new ShadeCardBL().GetById(selectedId); oSelectedShade.ModifiedBy = oUser.Email; oSelectedShade.ModifiedOn = DateTime.UtcNow; //affected shade ShadeCard oAffectedShade = new ShadeCardBL().GetById(affectedId); oAffectedShade.ModifiedBy = oUser.Email; oAffectedShade.ModifiedOn = DateTime.UtcNow; bool Result = new ShadeCardBL().MoveShades(oSelectedShade, oAffectedShade); if (Result == true) { return(Json(new { success = true, message = "Shade have been Re-Ordered successfully." })); } else { return(Json(new { success = false, message = CommonMsg.Error() })); } } catch (Exception ex) { return(Json(new { success = false, message = CommonMsg.Error() })); } }
public ActionResult SaveEmbroideryFirmPricing(EmbroideryFirmPriceSetting oEmbroideryFirmPriceSetting) { try { bool Add_Flag = new CommonBL().isNewEntry(oEmbroideryFirmPriceSetting.EmbroideryFirmPriceSettingsId); oEmbroideryFirmPriceSetting.ModifiedBy = oUser.Email; oEmbroideryFirmPriceSetting.ModifiedOn = DateTime.UtcNow; if (Add_Flag) { new EmbroideryFirmPriceSettingsBL().Create(oEmbroideryFirmPriceSetting); } else { new EmbroideryFirmPriceSettingsBL().Update(oEmbroideryFirmPriceSetting); } return(Json(new { success = true, message = CommonMsg.Success(EntityNames.EmbroideryFirmPricing, Add_Flag == true ? En_CRUD.Insert : En_CRUD.Update) })); } catch (Exception ex) { return(Json(new { success = false, message = CommonMsg.Error() })); } }
public ActionResult SetDefaultPrimaryLocation(Guid id) { try { EmbroideryFirmLocation oEmbroideryFirmLocation = new EmbroideryFirmLocationsBL().GetById(id); oEmbroideryFirmLocation.IsPrimaryLocation = true; new EmbroideryFirmLocationsBL().SetDefaultPrimaryLocation(oEmbroideryFirmLocation); return(Json(new { success = true, message = "Primary Location has been settled successfully" })); } catch (Exception ex) { return(Json(new { success = false, message = CommonMsg.Error() })); } }
public ActionResult AccountSetup(ResetPasswordModel oResetPasswordModel) { try { if (!string.IsNullOrEmpty(oResetPasswordModel.Email)) { //new UserBL().ConfirmUser(oResetPasswordModel.Email, oResetPasswordModel.UserName, oResetPasswordModel.ConfirmPassword); } TempData["successmsg"] = "Your account has been successfully Setup."; return(RedirectToAction("Index", "Account")); } catch (Exception) { TempData["errormsg"] = CommonMsg.Error(""); ViewBag.error = TempData["errormsg"]; return(View("AccountSetup", new ResetPasswordModel())); } }
public ActionResult ChangePassword(ChangePasswordModel oChangePasswordModel) { try { if (new UserBL().IsCurrentPasswordMatch(oChangePasswordModel.OldPassword, (User)Session[En_UserSession.User.ToString()])) { new UserBL().ChangePassword(oChangePasswordModel.NewPassword, (User)Session[En_UserSession.User.ToString()]); TempData["successmsg"] = "Your Password has been changed successfully."; } else { TempData["errormsg"] = "Your Current Password does not matched."; } } catch (Exception ex) { TempData["errormsg"] = CommonMsg.Error(""); } return(View()); }
public ActionResult Save(tblStudent oStudent) { try { bool Add_Flg = new CommonBL().isNewEntry(oStudent.StudentId); if (Add_Flg) { new StudentBL().Create(oStudent); } else { new StudentBL().Update(oStudent); } TempData["successmsg"] = CommonMsg.Success_Update(EntityNames.Student); return(RedirectToAction("ManageStudent", new { id = oStudent.StudentId })); } catch (Exception ex) { TempData["errormsg"] = CommonMsg.Error(); return(RedirectToAction("Index")); } }