public Bill CheckBill([FromBody]Bill account) { MysqlHelper mysqlhelper = new MysqlHelper(); Bill bill = mysqlhelper.GetBill(account); return bill; }
public string CreateUser([FromBody]User users) { MysqlHelper mysqlhelper = new MysqlHelper(); string data = mysqlhelper.CheckServoceCode(users); var succ= mysqlhelper.UpdateTheUser(users); return data; }
public bool CheckID(string hkid,string type) { // string value = GetClientIp(null); //MysqlHelper mysqlhelper = new MysqlHelper(); MysqlHelper mysqlhelper = new MysqlHelper(); //return mysqlhelper.GetQuestionList(); return mysqlhelper.CheckId(hkid,type); }
public string Swift(Swift swift) { Trans tran = new Trans(); tran.Amount = swift.Payer_Amount; tran.From = swift.Payer_Account_Num; MysqlHelper mysqlhelper = new MysqlHelper(); var status1 = mysqlhelper.ChecktheAccount(ref tran); if (status1 != "success") return status1; var status = mysqlhelper.OverSeaTrans(swift); return status; }
public User CheckQuestion([FromBody]User user) { MysqlHelper mysqlhelper = new MysqlHelper(); var status= mysqlhelper.CheckQestion(user); if (status.Status == "Success") { string ip = GetClientIp(); { mysqlhelper.UpdateLoginStatus(status, ip); } } return status; }
public string CheckAndChange(Trans trans) { MysqlHelper mysqlhelper = new MysqlHelper(); var status = mysqlhelper.ChecktheAccount(ref trans); if (status == "success") { return mysqlhelper.UpdateAccount(trans); } else { return status; } }
public User LoginUser([FromBody]User user) { MysqlHelper mysqlhelper = new MysqlHelper(); // return "Success"; var status = mysqlhelper.SearchUser(user); if (status.Status == "Success") { string ip = GetClientIp(); { mysqlhelper.UpdateLoginStatus(status,ip); } } return status; }
public IHttpActionResult GetNews() { //User user = new User(); //user.Name = "Awol"; //user.Password = "******"; //user.Hk_Id = "11"; //user.Question_Id = 1; //user.Question_Answer = "luowei"; //string json = JsonConvert.SerializeObject(user); //MysqlHelper mysqlhelper = new MysqlHelper(); MysqlHelper mysqlhelper = new MysqlHelper(); //return mysqlhelper.GetQuestionList(); return Ok(mysqlhelper.GetNews()); }
public string GetOneHisList([FromBody]History history) { if (history.Start_Date > history.End_Date) return ""; DateTime beijing = DateTime.Now.ToUniversalTime().AddHours(8); var html = ""; if (history.Start_Date.Year == 1 || history.End_Date.Year == 1 || history.Start_Date < beijing.AddMonths(-3)) { history.Start_Date = beijing.AddMonths(-3); history.End_Date = beijing; } MysqlHelper mysqlhelper = new MysqlHelper(); List<History> his_list = mysqlhelper.GetAccountHistory(history); foreach (History his in his_list) { html += string.Format("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td></tr>", his.Type, his.Start_Date,his.Amount, his.Currency); } return html; }
public string Repayment([FromBody] Repay repayment) { Trans trans = new Trans(); trans.From = repayment.Repay_Account; trans.Amount = repayment.Amount; trans.To = repayment.Credit_Account; trans.User_Id = repayment.User_Id; trans.Type = repayment.Type; // return "Success"; MysqlHelper mysqlhelper = new MysqlHelper(); var status = mysqlhelper.ChecktheAccount(ref trans); if (status == "success") { mysqlhelper.PushToRepayLog(repayment); return mysqlhelper.UpdateAccount(trans); } else { return status; } }
public string Transfer([FromBody]Trans trans) { MysqlHelper mysqlhelper = new MysqlHelper(); trans.Type = mysqlhelper.CheckTheInnerAccount(trans); var status = CheckAndChange(trans); if (status == "Success") { if (trans.Type == "1"|| trans.Type == "6") { return mysqlhelper.TransPush(trans); } else { return "Not a Transfer"; } } else { return status; } }
public List<Bank> GetBank() { MysqlHelper mysqlhelper = new MysqlHelper(); return mysqlhelper.GetBankList(); }
public string CheckPassword([FromBody]Card card) { MysqlHelper mysqlhelper = new MysqlHelper(); return mysqlhelper.CheckSavingAccount(ref card).Status; }
public string CheckLogin(User user) { MysqlHelper mysqlhelper = new MysqlHelper(); string status = mysqlhelper.CheckSession(user); return status; }
public string SetCommon(Saving saving) { MysqlHelper mysqlhelper = new MysqlHelper(); var status = mysqlhelper.SetCommon(saving); return status; }
public List<Saving> CheckAccountById(User user) { MysqlHelper mysqlhelper = new MysqlHelper(); //var user_id = mysqlhelper.SearchID(user.Name, user.Password); return mysqlhelper.GetAllSavingAccount(user.Id); }
public string UpdatePassword(User user) { MysqlHelper mysqlhelper = new MysqlHelper(); string status = mysqlhelper.UpdatePassword(user); return status; }
public List<Saving> CheckAccount(User user) { MysqlHelper mysqlhelper = new MysqlHelper(); var user_id = mysqlhelper.SearchID(user.Name, user.Session); return mysqlhelper.GetAllSavingAccount(user_id); }
public IHttpActionResult GetQuestion() { MysqlHelper mysqlhelper = new MysqlHelper(); //return mysqlhelper.GetQuestionList(); return Ok(mysqlhelper.GetQuestionList()); }
public List<Credit> CheckAccount([FromBody]User user) { MysqlHelper mysqlhelper = new MysqlHelper(); var user_id = mysqlhelper.SearchID(user.Name, user.Session); return mysqlhelper.GetAllCreditAccount(user_id); }
public List<Curr> getCurrency() { MysqlHelper mysqlhelper = new MysqlHelper(); return mysqlhelper.GetCurrency(); }
public bool NameSearch(string name) { MysqlHelper mysqlhelper = new MysqlHelper(); return mysqlhelper.SearchName(name); }
public Question getquestion(string name) { MysqlHelper mysqlhelper = new MysqlHelper(); return mysqlhelper.GetUserQueston(name); }