public HttpResponseMessage RegisterBaiduPhone(string RegisterID, string ChannelID) { try { AlarmRuleSetController CreatePhoneRecordCtrl = new AlarmRuleSetController(); PhoneRecordInfo Info = new PhoneRecordInfo();//宣告一個物件來接 UserInfo UInfo = UserController.GetCurrentUserInfo(); //DNN 本身物件取得基本資料 Info.PortalId = PortalSettings.PortalId; Info.DnnLogic = UInfo.Username; Info.RegisterID = RegisterID; Info.UserId = UInfo.UserID; //---------將資料放到物件------------------------------------------------------------------------ CreatePhoneRecordCtrl.InsertBaiduPhoneRegister(Info);//塞入手機紀錄資料 var jsonToReturn = new { InsertFillLog = "Success", }; return Request.CreateResponse(HttpStatusCode.OK, jsonToReturn); } catch (Exception ex) { return Request.CreateResponse(HttpStatusCode.OK, ex.Message); } }
private bool InsertBaiduDB(PhoneRecordInfo info) { ArrayList _CheckPhoneList = new ArrayList(); ArrayList _InsertDataList = new ArrayList(); _CheckPhoneList.Add(info.RegisterID); _InsertDataList.Add(info.PortalId); _InsertDataList.Add(info.DnnLogic); _InsertDataList.Add(info.RegisterID); _InsertDataList.Add(info.UserId); string result = DataProvider.Instance().ChkInsertBaiduDB(_CheckPhoneList); if (result.Equals("1")) DataProvider.Instance().InsertBaiduDB(_InsertDataList); return true; }
public HttpResponseMessage CreatePhoneRecord(string PhoneMailLogic, string RegisterID) { try { AlarmRuleSetController CreatePhoneRecordCtrl = new AlarmRuleSetController(); PhoneRecordInfo Info = new PhoneRecordInfo();//宣告一個物件來接 UserInfo UInfo = UserController.GetCurrentUserInfo(); Info.PortalId = PortalSettings.PortalId; Info.DnnLogic = UInfo.Username; Info.PhoneMailLogic = PhoneMailLogic; Info.RegisterID = RegisterID; Info.UserId = UInfo.UserID; //int result = CreatePhoneRecordCtrl.ChkPhoneRecord(Info);//判斷是否可新增手機紀錄資料 //string flag = ""; //return Request.CreateResponse(HttpStatusCode.OK, result); //return Request.CreateResponse(HttpStatusCode.OK, result); //---------將資料放到物件------------------------------------------------------------------------ //if (result.Equals(1)) //{ // flag = "Success"; CreatePhoneRecordCtrl.InsertPhoneRecord(Info);//塞入手機紀錄資料 //} //else // flag = "Fail"; var jsonToReturn = new { InsertFillLog = "Success", }; return Request.CreateResponse(HttpStatusCode.OK, jsonToReturn); } catch (Exception ex) { return Request.CreateResponse(HttpStatusCode.OK, ex.Message); } }
private bool InsertDB(PhoneRecordInfo info) { ArrayList al = new ArrayList(); ArrayList a2 = new ArrayList(); al.Add(info.DnnLogic); al.Add(info.PhoneMailLogic); al.Add(info.RegisterID); a2.Add(info.PortalId); a2.Add(info.DnnLogic); a2.Add(info.PhoneMailLogic); a2.Add(info.RegisterID); a2.Add(info.UserId); string result = DataProvider.Instance().ChkInsertDB(al); if (result.Equals("1")) DataProvider.Instance().InsertDB(a2); return true; }