public ActionResult Create(MasterBranchDealviewModel model)
        {
            ValidateMasterDistributorDealviewModel(model);
            TravelSession obj             = (TravelSession)Session["TravelPortalSessionInfo"];
            string        DistributorCode = mDealProvider.GetDistributorCodeByDistributorId(obj.LoginTypeId);

            try
            {
                if (!ModelState.IsValid)
                {
                    model.CreatedBy       = obj.AppUserId;
                    model.BranchOfficeId  = obj.LoginTypeId;
                    model.DistributorCode = DistributorCode;
                    mDealProvider.AddDistributorDealMaster(model, 1);
                    if (model.CopyDeal == true)
                    {
                        mDealProvider.CopyDealfromOneToAnotherfordistributor(model.DealName, model.DealMasterId, 1, model.BranchOfficeId, model.CreatedBy);
                    }

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