public ActionResult CView(String Client_ID) { if (Session["Login"] != null) { LoginSession loginsession = (LoginSession)Session["Login"]; ViewBag.CompanyLogo = loginsession.CompanyLogo; ViewBag.Layout1 = BAL.Common.LayoutType(loginsession.UserType); String actionName = this.ControllerContext.RouteData.Values["action"].ToString(); String controllerName = this.ControllerContext.RouteData.Values["controller"].ToString(); ViewBag.Menu = BAL.Common.GetActiveMenu(controllerName, actionName, BAL.Common.LayoutType(loginsession.UserType)); ViewBag.RoleName = loginsession.RoleName; if (Client_ID != null) { String Dec_ClientID = BAL.Security.URLDecrypt(Client_ID); DAL.ClientDetails client = new DAL.ClientDetails(); if ((Dec_ClientID != "0") && (Dec_ClientID != null)) { client = BAL.ClientModel.ViewClient(Dec_ClientID); } return View(client); } else { return RedirectToAction("Index", "Client"); } } else { return RedirectToAction("Index", "Home"); } }
public Object ViewRecord(Int64 clientId) { DAL.ClientDetails client = new ClientDetails(); try { client = DAL.DALClient.ClientView(clientId.ToString()); } catch (Exception ex) { throw; } return client; }
public static ClientDetails ClientView(String ClintID) { ClientDetails ClientList = new ClientDetails(); using (var context = new SycousCon()) { try { var parmode = new SqlParameter { ParameterName = "mode", Value = 1, Direction = ParameterDirection.Input }; var parClint = new SqlParameter { ParameterName = "ClientID", Value = ClintID, Direction = ParameterDirection.Input }; ClientList = context.ExecuteStoreQuery<ClientDetails>("exec [SYCOUS].[ClientDetails] @mode,@ClientID", parmode, parClint).FirstOrDefault(); return ClientList; } catch (Exception ex) { context.Dispose(); throw; } } }