private static string GetResponseValueforEmizonRequestQueue(int RequestReference, ref string ResponseMessage) { try { using (LinqToSqlDataContext dbContext = new LinqToSqlDataContext()) { EmizonQueueRequest _EmizonQueueRequest = (from EQR in dbContext.EmizonQueueRequests where EQR.ID == RequestReference select EQR).SingleOrDefault(); ResponseMessage = _EmizonQueueRequest.ResponseValue2; return(_EmizonQueueRequest.ResponseValue); } } catch (Exception exp) { return(null); } }
public static int AddtoEmizonRequestQueue(string EMNo, string QueueType) { int retvalue = -1; try { using (LinqToSqlDataContext dbContext = new LinqToSqlDataContext()) { EmizonQueueRequest _EmizonQueueRequest = new EmizonQueueRequest(); _EmizonQueueRequest.EMNo = EMNo; _EmizonQueueRequest.QueueType = QueueType; _EmizonQueueRequest.Createdon = System.DateTime.Now; _EmizonQueueRequest.Modifiedon = System.DateTime.Now; dbContext.EmizonQueueRequests.InsertOnSubmit(_EmizonQueueRequest); dbContext.SubmitChanges(); retvalue = _EmizonQueueRequest.ID; } } catch (Exception exp) { retvalue = -1; } return(retvalue); }