Beispiel #1
0
        public Bill CheckBill([FromBody]Bill account)
        {
            MysqlHelper mysqlhelper = new MysqlHelper();
            Bill bill = mysqlhelper.GetBill(account);

            return bill;
        }
Beispiel #2
0
 public string CreateUser([FromBody]User users)
 {
     MysqlHelper mysqlhelper = new MysqlHelper();
        string data =   mysqlhelper.CheckServoceCode(users);
       var succ=  mysqlhelper.UpdateTheUser(users);
     return data;
 }
Beispiel #3
0
        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);
        }
Beispiel #4
0
 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;
 }
Beispiel #5
0
 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;
 }
Beispiel #6
0
        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;
            }
        }
Beispiel #7
0
 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;
 }
Beispiel #8
0
        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());
        }
Beispiel #9
0
        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;
        }
Beispiel #10
0
 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;
     }
 }
Beispiel #11
0
        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;
            }
        }
Beispiel #12
0
 public List<Bank> GetBank()
 {
     MysqlHelper mysqlhelper = new MysqlHelper();
       return   mysqlhelper.GetBankList();
 }
Beispiel #13
0
 public string CheckPassword([FromBody]Card card)
 {
     MysqlHelper mysqlhelper = new MysqlHelper();
       return   mysqlhelper.CheckSavingAccount(ref card).Status;
 }
Beispiel #14
0
 public string CheckLogin(User user)
 {
     MysqlHelper mysqlhelper = new MysqlHelper();
       string status =   mysqlhelper.CheckSession(user);
     return status;
 }
Beispiel #15
0
 public string SetCommon(Saving saving)
 {
     MysqlHelper mysqlhelper = new MysqlHelper();
     var status = mysqlhelper.SetCommon(saving);
     return status;
 }
Beispiel #16
0
 public List<Saving> CheckAccountById(User user)
 {
     MysqlHelper mysqlhelper = new MysqlHelper();
     //var user_id = mysqlhelper.SearchID(user.Name, user.Password);
     return mysqlhelper.GetAllSavingAccount(user.Id);
 }
Beispiel #17
0
 public string UpdatePassword(User user)
 {
     MysqlHelper mysqlhelper = new MysqlHelper();
        string status =  mysqlhelper.UpdatePassword(user);
     return status;
 }
Beispiel #18
0
 public List<Saving> CheckAccount(User user)
 {
     MysqlHelper mysqlhelper = new MysqlHelper();
     var user_id = mysqlhelper.SearchID(user.Name, user.Session);
        return  mysqlhelper.GetAllSavingAccount(user_id);
 }
Beispiel #19
0
 public IHttpActionResult GetQuestion()
 {
     MysqlHelper mysqlhelper = new MysqlHelper();
         //return mysqlhelper.GetQuestionList();
         return Ok(mysqlhelper.GetQuestionList());
 }
Beispiel #20
0
 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);
 }
Beispiel #21
0
 public List<Curr> getCurrency()
 {
     MysqlHelper mysqlhelper = new MysqlHelper();
     return mysqlhelper.GetCurrency();
 }
Beispiel #22
0
 public bool NameSearch(string name)
 {
     MysqlHelper mysqlhelper = new MysqlHelper();
     return mysqlhelper.SearchName(name);
 }
Beispiel #23
0
 public Question getquestion(string name)
 {
     MysqlHelper mysqlhelper = new MysqlHelper();
     return mysqlhelper.GetUserQueston(name);
 }