示例#1
0
        public ActionResult BranchProfile(string BranchCode)
        {
            var branchprofile = new POSAccount.BusinessFactory.BranchBO().GetBranch(new POSAccount.Contract.Branch {
                BranchCode = BranchCode
            });

            return(View(branchprofile));
        }
示例#2
0
        public ActionResult SaveBranchProfile(POSAccount.Contract.Branch branch)
        {
            branch.CreatedBy  = Utility.DEFAULTUSER;
            branch.ModifiedBy = Utility.DEFAULTUSER;
            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 POSAccount.BusinessFactory.BranchBO().SaveBranch(branch);

            //return RedirectToAction("Branch", "MasterData", new { BranchCode = branch.BranchCode });
            return(RedirectToAction("CompanyProfile", "MasterData"));
        }