Esempio n. 1
0
        public ENT.ApplicationVersionView GetLatestVersion()
        {
            ENT.ApplicationVersionView Entity = new ENT.ApplicationVersionView();
            try
            {
                parFields.Clear();

                //Add Query in to string builder object
                QueryDisctionery.SelectPart = "select top 1 * ";
                QueryDisctionery.TablePart  = @"from ApplicationVersion";

                QueryDisctionery.OrderPart = "order by CreatedDateTime desc";

                //Execute Query and get SQLDataReader
                using (SqlDataReader dr = objDBHelper.ExecuteReaderQuery(QueryDisctionery, parFields, objEntity))
                {
                    Entity = COM.DBHelper.CopyDataReaderToSingleEntity <ENT.ApplicationVersionView>(dr);
                    objDBHelper.Disposed();
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                parFields.Clear();
            }
            return(Entity);
        }
Esempio n. 2
0
        public HttpResponseMessage GetLatestVersion()
        {
            GlobalVarible.Clear();

            try
            {
                using (BAL.ApplicationVersion objBal = new BAL.ApplicationVersion())
                {
                    ENT.ApplicationVersionView av = objBal.GetLatestVersion();

                    GlobalVarible.AddMessage("Application Version Get Successfully.");

                    return(ControllerContext.Request.CreateResponse(HttpStatusCode.OK, new { GlobalVarible.FormResult, av }));
                }
            }
            catch (Exception ex)
            {
                GlobalVarible.AddError(ex.Message);
                ERRORREPORTING.Report(ex, _REQUESTURL, _LOGINUSERID, _ERRORKEY, string.Empty);
                return(ControllerContext.Request.CreateResponse(HttpStatusCode.OK, new { GlobalVarible.FormResult }));
            }
        }
 public ENT.ApplicationVersionView GetLatestVersion()
 {
     ENT.ApplicationVersionView Entity = new ENT.ApplicationVersionView();
     Entity = clsDAL.GetLatestVersion();
     return(Entity);
 }