コード例 #1
0
ファイル: BALSearch.cs プロジェクト: arnabknd4/scs2300915
 Object IRecordView3.RecordView(String PropertyID, String OwnerID, String ConsumerID)
 {
     DAL.BillSearchList Vwdetails = new BillSearchList();
     try
     {
         Vwdetails = DAL.DALSearch.BillSearchRecordView(PropertyID, OwnerID, ConsumerID);
     }
     catch (Exception ex)
     {
         throw;
     }
     return Vwdetails;
 }
コード例 #2
0
ファイル: DALSearch.cs プロジェクト: arnabknd4/scs2300915
        public static BillSearchList BillSearchRecordView(String PropertyID, String OwnerID, String ConsumerID)
        {
            BillSearchList List = new BillSearchList();
            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<BillSearchList>("exec [SYCOUS].[GetSearchBIllDetails] @PropertyID,@OwnerID,@ConsumerID", pPropertyID, pOwnerID, pConsumerID).FirstOrDefault();
                    return List;
                }
                catch (Exception ex)
                {
                    context.Dispose();
                    throw;
                }
            }
        }
コード例 #3
0
        public ActionResult GetBillDetails(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.BillSearchList Vwobj = new DAL.BillSearchList();
                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.ViewBill(DPropID, _OwnerID, _consID);
                        ViewBag.PreviousBill = BAL.SearchModel.PreviousBillList(Vwobj.PropertyID, Vwobj.OwnerID, Vwobj.ConsumerID);

                    }
                    return View(Vwobj);
                }
                else
                {

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