public ActionResult SaveBranchProfile(NetStock.Contract.Branch branch)
        {
            branch.CreatedBy  = Session["DEFAULTUSER"].ToString();
            branch.ModifiedBy = Session["DEFAULTUSER"].ToString();
            branch.IsActive   = Utility.DEFAULTSTATUS;

            if (branch.BranchAddress.AddressId == 0 || branch.BranchAddress.AddressId == null)
            {
                branch.BranchAddress.AddressType   = "Branch";
                branch.BranchAddress.SeqNo         = 1;
                branch.BranchAddress.IsActive      = true;
                branch.BranchAddress.AddressLinkID = branch.BranchCode;
            }
            var result = new NetStock.BusinessFactory.BranchBO().SaveBranch(branch);

            return(RedirectToAction("BranchProfile", "MasterData", new { companyCode = branch.CompanyCode, branchCode = branch.BranchCode }));
        }
        public ActionResult BranchProfile(string companyCode, string branchCode)
        {
            var branchprofile = new NetStock.Contract.Branch();

            branchprofile.CompanyCode = companyCode;

            if (branchCode != "NEW")
            {
                branchprofile = new NetStock.BusinessFactory.BranchBO().GetBranch(new NetStock.Contract.Branch {
                    BranchCode = branchCode
                });
            }

            if (branchprofile == null)
            {
                branchprofile = new NetStock.Contract.Branch();
            }

            branchprofile.CountryList = Utility.GetCountryList();

            return(View(branchprofile));
        }