public HttpResponseMessage getByProfileID(string ID) { ProfileCore objProfCore = null; if (!string.IsNullOrWhiteSpace(ID)) { string strLoggedInUserID = string.Empty; IEnumerable <string> headerValues = Request.Headers.GetValues("MugurthamUserToken"); strLoggedInUserID = headerValues.FirstOrDefault(); Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(strLoggedInUserID, Request.Headers.GetValues("CommunityID").FirstOrDefault()); using (objLoggedIn as IDisposable) { // Destroy this objLoggedIn object ProfileCore objProfileCore = new ProfileCore(ref objLoggedIn); using (objProfileCore as IDisposable) objProfileCore.GetByProfileID(ID, out objProfCore, objLoggedIn); objProfileCore = null; } objLoggedIn = null; } return(Request.CreateResponse(HttpStatusCode.OK, objProfCore, Configuration.Formatters.JsonFormatter)); }
public HttpResponseMessage Get(string ID) { string LoggedInUserID = string.Empty; IEnumerable <string> headerValues = Request.Headers.GetValues("MugurthamUserToken"); LoggedInUserID = headerValues.FirstOrDefault(); Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); return(Request.CreateResponse(HttpStatusCode.OK, new LocationCore(ref objLoggedIn).GetByProfileID(ID, LoggedInUserID), Configuration.Formatters.JsonFormatter)); }
public HttpResponseMessage Get(string ID, string MugurthamUserToken = null) { /*//Working snippet for sample * IEnumerable<string> headerValues = Request.Headers.GetValues("MugurthamUserToken"); * string token = headerValues.FirstOrDefault(); * Helpers.LogMessageInFlatFile(token + "=====MugurthamUserToken");*/ Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); return(Request.CreateResponse(HttpStatusCode.OK, new BasicInfoCore(ref objLoggedIn).GetByProfileID(ID, MugurthamUserToken), Configuration.Formatters.JsonFormatter)); }
public HttpResponseMessage GetLookupDTO() { List <Mugurtham.Core.Sangam.SangamCoreEntity> objSangamCoreEntityList = new List <Core.Sangam.SangamCoreEntity>(); Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); Mugurtham.Core.Sangam.SangamCore objSangamCore = new Core.Sangam.SangamCore(objLoggedIn.ConnectionStringAppKey); using (objSangamCore as IDisposable) objSangamCore.GetAll(ref objSangamCoreEntityList); return(Request.CreateResponse(HttpStatusCode.OK, objSangamCoreEntityList, Configuration.Formatters.JsonFormatter)); }
public void Put([FromBody] UserCoreEntity objUserCoreEntity) { Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); UserCore objUserCore = new UserCore(objLoggedIn.ConnectionStringAppKey); using (objUserCore as IDisposable) { objUserCore.Edit(ref objUserCoreEntity); } objUserCore = null; }
public void Put([FromBody] HoroscopeCoreEntity objHoroscopeCoreEntity) { Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); using (objLoggedIn as IDisposable) { HoroscopeCore objHoroscopeCore = new HoroscopeCore(ref objLoggedIn); using (objHoroscopeCore as IDisposable) objHoroscopeCore.Edit(ref objHoroscopeCoreEntity); objHoroscopeCore = null; } }
public void Post([FromBody] ReferenceCoreEntity objReferenceCoreEntity) { Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); using (objLoggedIn as IDisposable) { ReferenceCore objReferenceCore = new ReferenceCore(ref objLoggedIn); using (objReferenceCore as IDisposable) { objReferenceCore.Add(ref objReferenceCoreEntity); } objReferenceCore = null; } }
public HttpResponseMessage Add([FromBody] RoleCoreEntity objRoleCoreEntity) { string strRoleID = string.Empty; Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); RoleCore objRoleCore = new RoleCore(ref objLoggedIn); using (objRoleCore as IDisposable) { objRoleCore.Add(ref objRoleCoreEntity, out strRoleID); } objRoleCore = null; return(Request.CreateResponse(HttpStatusCode.OK, strRoleID, Configuration.Formatters.JsonFormatter)); }
public HttpResponseMessage GetAllSangamUsers(string ID) { List <UserCoreEntity> objSangamCoreEntityList = new List <UserCoreEntity>(); if (!string.IsNullOrWhiteSpace(ID)) { Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); UserCore objUserCore = new UserCore(objLoggedIn.ConnectionStringAppKey); using (objUserCore as IDisposable) objUserCore.GetAllSangamUsers(ref objSangamCoreEntityList, ID); objUserCore = null; } return(Request.CreateResponse(HttpStatusCode.OK, objSangamCoreEntityList, Configuration.Formatters.JsonFormatter)); }
public void Put([FromBody] BasicInfoCoreEntity objBasicInfoCoreEntity) { string strLoggedInUserID = string.Empty; IEnumerable <string> headerValues = Request.Headers.GetValues("MugurthamUserToken"); strLoggedInUserID = headerValues.FirstOrDefault(); Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); using (objLoggedIn as IDisposable) { BasicInfoCore objBasicInfoCore = new BasicInfoCore(ref objLoggedIn); using (objBasicInfoCore as IDisposable) objBasicInfoCore.Edit(ref objBasicInfoCoreEntity); objBasicInfoCore = null; } objLoggedIn = null; }
public HttpResponseMessage getProfileByProfileID(string ID) { ProfileCore objProfileCoreForView = null; Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); using (objLoggedIn as IDisposable) { ProfileCore objProfileCore = new ProfileCore(ref objLoggedIn); using (objProfileCore as IDisposable) { objProfileCore.GetByProfileID(ID, out objProfileCoreForView, objLoggedIn); } objProfileCore = null; } objLoggedIn = null; return(Request.CreateResponse(HttpStatusCode.OK, objProfileCoreForView, Configuration.Formatters.JsonFormatter)); }
public void Put([FromBody] SangamCoreEntity objSangamCoreEntity) { decimal?lastProfileIDNo = 0; Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); SangamCore objSangamCore = new SangamCore(objLoggedIn.ConnectionStringAppKey); using (objSangamCore as IDisposable) { if (!string.IsNullOrWhiteSpace(objSangamCore.GetByID(objSangamCoreEntity.ID).LastProfileIDNo.ToString())) { lastProfileIDNo = objSangamCore.GetByID(objSangamCoreEntity.ID).LastProfileIDNo; } objSangamCoreEntity.LastProfileIDNo = lastProfileIDNo; objSangamCore.Edit(ref objSangamCoreEntity); } objSangamCore = null; }
public HttpResponseMessage Get() { Mugurtham.Core.Lookup.LookupEntity objLookupEntity = new Core.Lookup.LookupEntity(); try { Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); using (objLoggedIn as IDisposable) { Mugurtham.Core.Lookup.LookupCore objLookupCore = new Core.Lookup.LookupCore(ref objLoggedIn); using (objLookupCore as IDisposable) objLookupCore.getLookup(ref objLookupEntity); objLookupCore = null; } } catch (Exception objEx) { Helpers.LogExceptionInFlatFile(objEx); } return(Request.CreateResponse(HttpStatusCode.OK, objLookupEntity, Configuration.Formatters.JsonFormatter)); }
public HttpResponseMessage GetAllPaymentTransactions() { List <Core.Payment.PaymentProfileTransactions.PaymentProfileTransactionsCoreEntity> objPaymentProfileTransactionsCoreEntityList = new List <Core.Payment.PaymentProfileTransactions.PaymentProfileTransactionsCoreEntity>(); string strLoggedInUserID = string.Empty; IEnumerable <string> headerValues = Request.Headers.GetValues("MugurthamUserToken"); strLoggedInUserID = headerValues.FirstOrDefault(); Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(strLoggedInUserID, Request.Headers.GetValues("CommunityID").FirstOrDefault()); using (objLoggedIn as IDisposable) { Core.Payment.PaymentProfileTransactions.PaymentProfileTransactionsCore objPaymentProfileTransactionsCore = new Core.Payment.PaymentProfileTransactions.PaymentProfileTransactionsCore(objLoggedIn); using (objPaymentProfileTransactionsCore as IDisposable) objPaymentProfileTransactionsCore.GetAllPaymentTransactions(ref objPaymentProfileTransactionsCoreEntityList); objPaymentProfileTransactionsCore = null; } objLoggedIn = null; return(Request.CreateResponse(HttpStatusCode.OK, objPaymentProfileTransactionsCoreEntityList, Configuration.Formatters.JsonFormatter)); }
public HttpResponseMessage Get(string ID) { Mugurtham.Core.Login.LoggedInUser objLoggedIn = new Core.Login.LoggedInUser(Request.Headers.GetValues("MugurthamUserToken").FirstOrDefault(), Request.Headers.GetValues("CommunityID").FirstOrDefault()); return(Request.CreateResponse(HttpStatusCode.OK, new RoleCore(ref objLoggedIn).GetByID(ID), Configuration.Formatters.JsonFormatter)); }