public ActionResult Create(MasterBranchDealviewModel model) { ValidateMasterBranchDealviewModel(model); TravelSession obj = (TravelSession)Session["TravelPortalSessionInfo"]; string BranchCode = mDealProvider.GetBranchCodeByBranchId(obj.LoginTypeId); try { if (!ModelState.IsValid) { model.CreatedBy = obj.AppUserId; model.BranchOfficeId = obj.LoginTypeId; model.BranchOfficeCode = BranchCode; if (model.CopyDeal == true) { mDealProvider.CopyDealFromOneToAnotherForMobileBranch(model.DealName, model.DealMasterId, 3, model.BranchOfficeId, model.CreatedBy); } else { mDealProvider.AddDealMaster(model, 3); } return(RedirectToAction("Index", "BranchsDealSetup")); } else { return(RedirectToAction("Index", "BranchsDealSetup")); } } catch { return(RedirectToAction("Index", "BranchsDealSetup")); } }