Esempio n. 1
0
 public Object ViewRecord(Int64 ID)
 {
     DAL.DirectDebitList vwdebit = new DAL.DirectDebitList();
     try
     {
         vwdebit = DAL.DALDirectDebit.ViewDirectDebit(ID.ToString());
     }
     catch (Exception ex)
     {
         throw;
     }
     return vwdebit;
 }
Esempio n. 2
0
        public static DirectDebitList ViewDirectDebit(String ID)
        {
            try
            {
                DirectDebitList objview = new DirectDebitList();

                using (var context = new SycousCon())
                {
                    var parmode = new SqlParameter
                    {
                        ParameterName = "Mode",
                        Value = "3",
                        Direction = ParameterDirection.Input
                    };

                    var parID = new SqlParameter
                    {
                        ParameterName = "ID",
                        Value = ID,
                        Direction = ParameterDirection.Input
                    };
              objview = context.ExecuteStoreQuery<DirectDebitList>("exec SYCOUS.GetDirectDebitList @Mode,@ID", parmode, parID).FirstOrDefault();
                }

                return objview;
            }
            catch (Exception ex)
            {
                throw;
            }
        }
 public ActionResult CView(String DebitID)
 {
     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 (DebitID != null)
         {
             String DecDebitID = BAL.Security.URLDecrypt(DebitID);
             DAL.DirectDebitList viewobj = new DAL.DirectDebitList();
             if ((DecDebitID != "0") && (DecDebitID != null))
             {
                 viewobj = BAL.DirectDebitModel.ViewDirectDebit(DecDebitID);
             }
             return View(viewobj);
         }
         else
         { return Content("No Record Found"); }
     }
     else
     { return RedirectToAction("Index", "Home"); }
 }