Пример #1
0
 Object IView3.RecordView(String PropertyID, String OwnerID, String ConsumerID)
 {
     DAL.AccountSearchList Vwdetails = new AccountSearchList();
     try
     {
         Vwdetails = DAL.DALSearch.AccountSearchRecordView(PropertyID, OwnerID, ConsumerID);
     }
     catch (Exception ex)
     {
         throw;
     }
     return Vwdetails;
 }
Пример #2
0
        public static AccountSearchList AccountSearchRecordView(String PropertyID, String OwnerID, String ConsumerID)
        {
            AccountSearchList List = new AccountSearchList();
            using (var context = new SycousCon())
            {
                try
                {
                    var pPropertyID = new SqlParameter
                    {
                        ParameterName = "PropertyID",
                        Value = PropertyID,
                        Direction = ParameterDirection.Input
                    };
                    var pOwnerID = new SqlParameter
                    {
                        ParameterName = "OwnerID",
                        Value = OwnerID,
                        Direction = ParameterDirection.Input
                    };

                    var pConsumerID = new SqlParameter
                    {
                        ParameterName = "ConsumerID",
                        Value = ConsumerID,
                        Direction = ParameterDirection.Input
                    };

                    List = context.ExecuteStoreQuery<AccountSearchList>("exec [SYCOUS].[GetSearchAccountDetails] @PropertyID,@OwnerID,@ConsumerID", pPropertyID, pOwnerID, pConsumerID).FirstOrDefault();
                    return List;
                }
                catch (Exception ex)
                {
                    context.Dispose();
                    throw;
                }
            }
        }
Пример #3
0
        public ActionResult GetAccountDetails(String consID, String OwnerID, String PropID, String SiteID, String ClientID, String MeterID)
        {
            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, BAL.Common.LayoutType(loginsession.UserType));
                DAL.AccountSearchList Vwobj = new DAL.AccountSearchList();
                if (PropID != null)
                {

                    String DPropID = BAL.Security.URLDecrypt(PropID);
                    String _OwnerID = BAL.Security.URLDecrypt(OwnerID);
                    String _consID = BAL.Security.URLDecrypt(consID);

                    if ((DPropID != "0") && (DPropID != null))
                    {
                        Vwobj = BAL.SearchModel.ViewAccount(DPropID, _OwnerID, _consID);
                        ViewBag.TransactionList = BAL.SearchModel.AccountRecordList(Vwobj.PropertyID, Vwobj.OwnerID, Vwobj.ConsumerID, Vwobj.ConsumerType);
                    }
                    return View(Vwobj);
                }
                else
                {

                    return RedirectToAction("Index", "Search");
                }
            }
            else
            { return RedirectToAction("Index", "Home"); }
        }