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;
                    mDealProvider.AddDealMaster(model, 1);
                    if (model.CopyDeal == true)
                    {
                        mDealProvider.CopyDealfromOneToAnother(model.DealName, model.DealMasterId, 1, model.BranchOfficeId, model.CreatedBy);
                    }

                    return(RedirectToAction("Index", "BranchDealSetup"));
                }
                else
                {
                    return(RedirectToAction("Index", "BranchDealSetup"));
                }
            }
            catch
            {
                return(RedirectToAction("Index", "BranchDealSetup"));
            }
        }