public ActionResult UpdateIsPromotion(string RankIDs) { RanksBLL RankBLL = new RanksBLL(); RankIDs = RankIDs == "0" ? "" : RankIDs; RankBLL.LoginIdentity = UserIdentity; Result result = RankBLL.UpdateIsPromotion(RankIDs); if ((System.Type)result.EnumType == typeof(RanksValidationEnum)) { if (result.EnumMember == RanksValidationEnum.Done.ToString()) { } //else if (result.EnumMember == RanksValidationEnum.RejectedBecauseOfNoCheckBoxSelected.ToString()) //{ // throw new CustomException(Resources.Globalization.ValidationRankNoCheckBoxSelectedText); //} else if (result.EnumMember == RanksValidationEnum.RejectedBecauseOfCheckBoxMultipleSelected.ToString()) { throw new CustomException(Resources.Globalization.ValidationRankMultiCheckBoxSelectedText); } } return(RedirectToAction("Index"));// View(); }
public ActionResult Create() { Session["PromotionRecordEmployees"] = null; RanksBLL rankBLL = new RanksBLL().GetActiveRankForPromotion(); PromotionsRecordsViewModel PromotionRecordVM = new PromotionsRecordsViewModel() { PromotionRecordID = 0, RankID = rankBLL != null ? rankBLL.RankID : 0, RankName = rankBLL != null ? rankBLL.RankName : string.Empty, PromotionRecordDate = DateTime.Now.Date, PromotionRecordToolbarID = (int)HCM.Classes.Enums.PromotionsRecordsToolbarEnum.Open, PromotionRecordStatus = new PromotionsRecordsStatusViewModel() }; return(View(PromotionRecordVM)); }