public ActionResult GetBranchById(int ID) { string operation = Session["Operation"].ToString(); ButtonVisiblity(operation); var tblBranch = _branchService.GetBranchMasterById(ID); var branch = new BranchViewModel(); if (tblBranch != null) { branch = _branchService.SetRecordinEdit(tblBranch); } var pincodelist = _branchService.GetPincodeMasterList(); ViewBag.PincodeList = new SelectList(pincodelist, "PcId", "PincodeWithArea"); branch.BranchTypeList = new SelectList(_branchService.GetBranchTypeList(), "Id", "Name"); return(View("Branch", branch)); }