public dynamic GenerateDoUrl(ReqDoUrl data) { dynamic response = null; try { var res = SODAL.ValidateDODetails(data); //00 = Success,01 = Not found SalesOrders or CustomerCode if (res.Code == "00") { response = new RspDoUrl(); var reqParams = GenerateReqparams(data); string hashParams = Utility.HashData(Guid.NewGuid().ToString()); SODAL.InsLogReq(reqParams, hashParams); hashParams = HttpUtility.UrlEncode(hashParams); response.pageUrl = SysDAL.GetConfig("1002") + hashParams; } else { response = new ErrorAuthen(); response.status = new StatusError(); response.status.code = res.Code; response.status.message = res.Msg; } } catch (Exception ex) { throw ex; } return(response); }
public ResponseInfo <ResponseSODetails> GetdataSO(ReqDataByHash data) { ResponseInfo <ResponseSODetails> response = new ResponseInfo <ResponseSODetails>(); try { string reqParam = SODAL.AuthenCheckTokenURLExpire(data.hashParams); if (!string.IsNullOrEmpty(reqParam)) { string[] reqParams = reqParam.Split(','); response.ResponseData = new ResponseSODetails(); var listData = SODAL.GetSODetails(reqParams); response.ResponseData.sODetails = HelperUtil.GenerateSoDetailBase64String(listData); } else { response.ResponseCode = "99"; response.ResponseMsg = "HashParams expire or invalid"; } } catch (Exception ex) { throw ex; } return(response); }
public ResponseInfo <ResponseUrl> GenerateSoUrl(RequestUrl data) { ResponseInfo <ResponseUrl> response = new ResponseInfo <ResponseUrl>(); try { var res = SODAL.ValidateSODetails(data); response.ResponseCode = res.Code; response.ResponseMsg = res.Msg; //00 = Success,01 = Not found SalesOrders or CustomerCode if (response.ResponseCode == "00") { var reqParams = GenerateReqparams(data); string hashParams = Utility.HashData(Guid.NewGuid().ToString()); SODAL.InsLogReq(reqParams, hashParams); hashParams = HttpUtility.UrlEncode(hashParams); response.ResponseData = new ResponseUrl(); response.ResponseData.pageUrl = System.Configuration.ConfigurationManager.AppSettings["MasterURL"].ToString() + hashParams; } } catch (Exception ex) { throw ex; } return(response); }
public ResponseStatus PostDOSOMapping(DOSOMappingObj data) { //dynamic res = null; dynamic res = new ResponseStatus(); try { var result = SODAL.PostDOSOMapping(data); if (result) { res.status = new Status(); } else { res.status = new Status(); res.status.code = "01"; res.status.message = "can't insert data"; } } catch (Exception ex) { throw ex; } return(res); }
public dynamic GetSurveyByHash(ReqDataByHash data) { dynamic response = null; try { string reqParam = SODAL.AuthenCheckTokenURLExpire(data.hashParams); if (!string.IsNullOrEmpty(reqParam)) { string[] reqParams = reqParam.Split(','); response = new RspSurveyList(); response.surveys = SODAL.GetSurveyByHash(reqParams); } else { response = new ErrorAuthen(); response.status = new StatusError(); response.status.code = "99"; response.status.message = "HashParams expire or invalid"; } } catch (Exception ex) { throw ex; } return(response); }
public dynamic GetDoByHash(ReqDataByHash data) { dynamic response = null; try { string reqParam = SODAL.AuthenCheckTokenURLExpire(data.hashParams); if (!string.IsNullOrEmpty(reqParam)) { string[] reqParams = reqParam.Split(','); response = new ResponseSODetails(); var listData = SODAL.GetDoByHash(reqParams); response.sODetails = HelperUtil.GenerateSoDetailBase64String(listData); } else { response = new ErrorAuthen(); response.status = new StatusError(); response.status.code = "99"; response.status.message = "HashParams expire or invalid"; } } catch (Exception ex) { throw ex; } return(response); }
public UnitOfWork(SalDbContext _context) { context = _context; TwitterDAL = new TwitterDAL(_context); TimeSeriesDAL = new TimeSeriesDAL(_context); GUPPYDAL = new GUPPYDAL(_context); MACDDAL = new MACDDAL(_context); SODAL = new SODAL(_context); RSIDAL = new RSIDAL(_context); StockSummaryDAL = new StockSummaryDAL(_context); }
public ResponseInfo <string> PostSystemNoti(ReqPostSystemNoti data) { ResponseInfo <string> res = new ResponseInfo <string>(); try { SODAL.PostSystemNoti(data); res.ResponseData = "Success"; } catch (Exception ex) { throw ex; } return(res); }
public ResponseInfo <RspJobStatus> GetJobStatus(ReqJobStatus data) { ResponseInfo <RspJobStatus> response = new ResponseInfo <RspJobStatus>(); try { response.ResponseData = new RspJobStatus(); response.ResponseData.jobStatus = SODAL.GetJobStatus(data); } catch (Exception ex) { throw ex; } return(response); }
public ResponseInfo <RspSystemNotiList> GetSystemNotiList(ReqSystemNotiList data) { ResponseInfo <RspSystemNotiList> response = new ResponseInfo <RspSystemNotiList>(); try { response.ResponseData = new RspSystemNotiList(); response.ResponseData.systemNotiList = SODAL.GetSystemNotiList(data); } catch (Exception ex) { throw ex; } return(response); }
public ResponseInfo <RspGetGradeList> GetGradeList(ReqGetGradeList data) { ResponseInfo <RspGetGradeList> response = new ResponseInfo <RspGetGradeList>(); try { response.ResponseData = new RspGetGradeList(); response.ResponseData.gradeList = SODAL.GetGradeList(data); } catch (Exception ex) { throw ex; } return(response); }
public ResponseInfo <ResponseCustomerInfo> GetCustomerInfo(RequestCustomerInfo data) { ResponseInfo <ResponseCustomerInfo> response = new ResponseInfo <ResponseCustomerInfo>(); try { response.ResponseData = new ResponseCustomerInfo(); response.ResponseData.ResCustomerInfo = SODAL.GetCustomerInfoList(data); } catch (Exception ex) { throw ex; } return(response); }
public ResponseInfo <ResponseSODetails> GetSoListFromCust(RequestSODetailsFromCustAndSo data) { ResponseInfo <ResponseSODetails> response = new ResponseInfo <ResponseSODetails>(); try { response.ResponseData = new ResponseSODetails(); var listData = SODAL.GetSoListFromCust(data); response.ResponseData.sODetails = HelperUtil.GenerateSoDetailBase64String(listData); } catch (Exception ex) { throw ex; } return(response); }
public ResponseStatus UpdateCompany(UpdCompanyObj data) { dynamic res = new ResponseStatus(); try { var result = SODAL.PostUpdateCompany(data); if (result) { res.status = new Status(); } else { res.status = new Status(); res.status.code = "01"; res.status.message = "can't update data"; } } catch (Exception ex) { throw ex; } return(res); }
public ResponseStatus PostSystemNotiReview(NotiReviewObj data) { ResponseStatus res = new ResponseStatus(); try { var result = SODAL.PostSystemNotiReview(data); if (result) { res.status = new Status(); } else { res.status = new Status(); res.status.code = "01"; res.status.message = "can't update data"; } } catch (Exception ex) { throw ex; } return(res); }