Exemplo n.º 1
0
 Object IGetRecord.GetRecord(String UserID)
 {
     DAL.UserConsumerDetails UScons = new UserConsumerDetails();
      try
      {
          UScons = DAL.DALSearch.UserConsumerDetails(UserID);
      }
      catch (Exception ex)
      {
          throw;
      }
      return UScons;
 }
Exemplo n.º 2
0
        public static UserConsumerDetails UserConsumerDetails(String UserID)
        {
            UserConsumerDetails  Consumer = new UserConsumerDetails ();
            using (var context = new SycousCon())
            {
                try
                {

                    var pUserID = new SqlParameter
                    {
                        ParameterName = "UserID",
                        Value = UserID,
                        Direction = ParameterDirection.Input
                    };
                    Consumer = context.ExecuteStoreQuery<UserConsumerDetails>("exec [SYCOUS].[GetConsumerSearchInfo] @UserID", pUserID).FirstOrDefault();
                }
                catch (Exception ex)
                {
                    context.Dispose();
                    throw;
                }
            }//using
            return Consumer;
        }