Esempio n. 1
0
 public ServiceResponse GetCurrentTime(int id)
 {
     result = new ServiceResponse();
     try
     {
         result.StatusCode = (int)HttpStatusCode.OK;
         result.Response = DateTime.Now;
     }
     catch
     {
         result.StatusCode = (int)HttpStatusCode.MethodNotAllowed;
         result.Response = 0;
     }
     return result;
 }
Esempio n. 2
0
        public ServiceResponse GetEntityDetail([FromBody]JObject jobj)
        {
            result = new ServiceResponse();

            try
            {
                Guid systemSession = DevelopmentManagerFactory.GetSystemSession();
                IDevelopmentManager marcomManager = DevelopmentManagerFactory.GetDevelopmentManager(systemSession);
                result.StatusCode = (int)HttpStatusCode.OK;
                result.Response = marcomManager.CommonManager.GetEntities(1, 20);
            }
            catch
            {
                result.StatusCode = (int)HttpStatusCode.MethodNotAllowed;
                result.Response = 0;
            }
            return result;
        }
Esempio n. 3
0
 public ServiceResponse GetEntities(int pageNo, int pageSize)
 {
     result = new ServiceResponse();
     try
     {
         Guid systemSession = DevelopmentManagerFactory.GetSystemSession();
         IDevelopmentManager marcomManager = DevelopmentManagerFactory.GetDevelopmentManager(systemSession);
         result.StatusCode = (int)HttpStatusCode.OK;
         //result.Response = JsonConvert.SerializeObject(marcomManager.CommonManager.GetEntities(pageNo, pageSize)); //serialization sample
         result.Response = marcomManager.CommonManager.GetEntities(pageNo, pageSize);
     }
     catch
     {
         result.StatusCode = (int)HttpStatusCode.MethodNotAllowed;
         result.Response = 0;
     }
     return result;
 }
Esempio n. 4
0
        public ServiceResponse GetEntityTypeAttributeRelation()
        {
            result = new ServiceResponse();

            try
            {
                Guid systemSession = DevelopmentManagerFactory.GetSystemSession();
                IDevelopmentManager marcomManager = DevelopmentManagerFactory.GetDevelopmentManager(systemSession);
                result.StatusCode = (int)HttpStatusCode.OK;
                result.Response = marcomManager.CommonManager.GetEntityTypeRelationById("version1", 63, 1);
            }
            catch
            {
                result.StatusCode = (int)HttpStatusCode.MethodNotAllowed;
                result.Response = 0;
            }
            return result;
        }
Esempio n. 5
0
 public ServiceResponse TestMethod()
 {
     result = new ServiceResponse();
     try
     {
         Guid systemSession = DevelopmentManagerFactory.GetSystemSession();
         IDevelopmentManager marcomManager = DevelopmentManagerFactory.GetDevelopmentManager(systemSession);
         result.StatusCode = (int)HttpStatusCode.OK;
         result.Response = marcomManager.CommonManager.TestMethod();
     }
     catch
     {
         result.StatusCode = (int)HttpStatusCode.MethodNotAllowed;
         result.Response = 0;
     }
     return result;
 }
Esempio n. 6
0
        public ServiceResponse GetEntityTypes()
        {
            result = new ServiceResponse();

            try
            {
                Guid systemSession = DevelopmentManagerFactory.GetSystemSession();
                IDevelopmentManager marcomManager = DevelopmentManagerFactory.GetDevelopmentManager(systemSession);
                result.StatusCode = (int)HttpStatusCode.OK;
                result.Response = marcomManager.CommonManager.GetObject<EntityTypeMongoDao>("version1");
            }
            catch
            {
                result.StatusCode = (int)HttpStatusCode.MethodNotAllowed;
                result.Response = 0;
            }
            return result;
        }