Exemple #1
0
        public void PayAward(HttpContext context)
        {
            try
            {
                HttpRequest request      = context.Request;
                string      PayUID       = RequestHelper.string_transfer(request, "PayUID");
                int         Code         = RequestHelper.int_transfer(request, "Code");
                string      PrizeContent = RequestHelper.string_transfer(request, "PrizeContent");
                string      UID          = RequestHelper.string_transfer(request, "UID");
                string      dsp          = RequestHelper.string_transfer(request, "dsp");


                bool result = Constant.Check_Login_DIP_Admin(UID, dsp);
                if (result)
                {
                    jsonModel = PayAward_Helper(Code, PayUID, PrizeContent);
                }
                else
                {
                    jsonModel = JsonModel.GetJsonModel(1000, "已超时");
                }
            }
            catch (Exception ex)
            {
                jsonModel = JsonModel.GetJsonModel(400, ex.Message);
                LogHelper.Error(ex);
            }
            finally
            {
                //无论后端出现什么问题,都要给前端有个通知【为防止jsonModel 为空 ,全局字段 jsonModel 特意声明之后进行初始化】
                context.Response.Write("{\"result\":" + Constant.jss.Serialize(jsonModel) + "}");
            }
        }
        public void ServiceTempClear(HttpContext context)
        {
            try
            {
                HttpRequest request = context.Request;
                string      UID     = RequestHelper.string_transfer(request, "UID");
                string      dsp     = RequestHelper.string_transfer(request, "dsp");
                string      Scrept  = RequestHelper.string_transfer(request, "Scrept");


                bool result = Constant.Check_Login_DIP_Admin(UID, dsp);
                if (result || Scrept == Static_Scrept)
                {
                    jsonModel = ServiceTempClear_Helper();
                }
                else
                {
                    jsonModel = JsonModel.GetJsonModel(1000, "已超时");
                }
            }
            catch (Exception ex)
            {
                jsonModel = JsonModel.GetJsonModel(400, ex.Message, "");
                LogHelper.Error(ex);
            }
            finally
            {
                //无论后端出现什么问题,都要给前端有个通知【为防止jsonModel 为空 ,全局字段 jsonModel 特意声明之后进行初始化】
                context.Response.Write("{\"result\":" + Constant.jss.Serialize(jsonModel) + "}");
            }
        }
        public void Globe_PaySetting(HttpContext context)
        {
            try
            {
                HttpRequest request     = context.Request;
                string      Code        = RequestHelper.string_transfer(request, "Code");
                string      Pay1        = RequestHelper.string_transfer(request, "Pay1");
                string      Pay2        = RequestHelper.string_transfer(request, "Pay2");
                decimal     Return_Pay  = RequestHelper.decimal_transfer(request, "Return_Pay");
                decimal     Return_Pay2 = RequestHelper.decimal_transfer(request, "Return_Pay2");

                string UID    = RequestHelper.string_transfer(request, "UID");
                string dsp    = RequestHelper.string_transfer(request, "dsp");
                bool   result = Constant.Check_Login_DIP_Admin(UID, dsp);
                if (result)
                {
                    jsonModel = Globe_PaySetting_Helper(Code, Pay1, Pay2, Return_Pay, Return_Pay2);
                }
                else
                {
                    jsonModel = JsonModel.GetJsonModel(1000, "已超时");
                }
            }
            catch (Exception ex)
            {
                jsonModel = JsonModel.GetJsonModel(400, ex.Message);
                LogHelper.Error(ex);
            }
            finally
            {
                //无论后端出现什么问题,都要给前端有个通知【为防止jsonModel 为空 ,全局字段 jsonModel 特意声明之后进行初始化】
                context.Response.Write("{\"result\":" + Constant.jss.Serialize(jsonModel) + "}");
            }
        }
        public void GetMoneyLog(HttpContext context)
        {
            try
            {
                HttpRequest request   = context.Request;
                string      LoginName = RequestHelper.string_transfer(request, "LoginName");

                int PageIndex = RequestHelper.int_transfer(request, "PageIndex");
                int PageSize  = RequestHelper.int_transfer(request, "PageSize");

                string UID    = RequestHelper.string_transfer(request, "UID");
                string dsp    = RequestHelper.string_transfer(request, "dsp");
                bool   result = Constant.Check_Login_DIP_Admin(UID, dsp);
                if (result)
                {
                    jsonModel = GetMoneyLog_Helper(LoginName, PageIndex, PageSize);
                }
                else
                {
                    jsonModel = JsonModel.GetJsonModel(300, "未经授权");
                }
            }
            catch (Exception ex)
            {
                jsonModel = JsonModel.GetJsonModel(400, ex.Message);
                LogHelper.Error(ex);
            }
            finally
            {
                //无论后端出现什么问题,都要给前端有个通知【为防止jsonModel 为空 ,全局字段 jsonModel 特意声明之后进行初始化】
                context.Response.Write("{\"result\":" + Constant.jss.Serialize(jsonModel) + "}");
            }
        }
 public void ReduceUserMoney(HttpContext context)
 {
     try
     {
         HttpRequest request = context.Request;
         int         Id      = RequestHelper.int_transfer(request, "Id");
         decimal     Money   = RequestHelper.decimal_transfer(request, "Money");
         string      UID     = RequestHelper.string_transfer(request, "UID");
         string      dsp     = RequestHelper.string_transfer(request, "dsp");
         bool        result  = Constant.Check_Login_DIP_Admin(UID, dsp);
         if (result)
         {
             jsonModel = ReduceUserMoney_Helper(Id, Money);
         }
         else
         {
             jsonModel = JsonModel.GetJsonModel(300, "未经授权");
         }
     }
     catch (Exception ex)
     {
         jsonModel = JsonModel.GetJsonModel(400, ex.Message);
         LogHelper.Error(ex);
     }
     finally
     {
         //无论后端出现什么问题,都要给前端有个通知【为防止jsonModel 为空 ,全局字段 jsonModel 特意声明之后进行初始化】
         context.Response.Write("{\"result\":" + Constant.jss.Serialize(jsonModel) + "}");
     }
 }
Exemple #6
0
        public void EditAward(HttpContext context)
        {
            try
            {
                HttpRequest request = context.Request;

                string EditUID = RequestHelper.string_transfer(request, "EditUID");
                EditUID = string.IsNullOrEmpty(EditUID) ? "admin" : EditUID;

                int Id   = RequestHelper.int_transfer(request, "Id");
                int Year = RequestHelper.int_transfer(request, "Year");
                int Name = RequestHelper.int_transfer(request, "Name");

                DateTime StartTime    = RequestHelper.DateTime_transfer(request, "StartTime");
                DateTime EndTime      = RequestHelper.DateTime_transfer(request, "EndTime");
                DateTime CloseTime    = RequestHelper.DateTime_transfer(request, "CloseTime");
                string   PrizeContent = RequestHelper.string_transfer(request, "PrizeContent");
                string   UID          = RequestHelper.string_transfer(request, "UID");
                string   dsp          = RequestHelper.string_transfer(request, "dsp");


                bool result = Constant.Check_Login_DIP_Admin(UID, dsp);
                if (result)
                {
                    jsonModel = EditAward_Helper(Id, EditUID, Year, Name, PrizeContent, StartTime, EndTime, CloseTime);
                }
                else
                {
                    jsonModel = JsonModel.GetJsonModel(1000, "已超时");
                }
            }
            catch (Exception ex)
            {
                jsonModel = JsonModel.GetJsonModel(400, ex.Message);
                LogHelper.Error(ex);
            }
            finally
            {
                //无论后端出现什么问题,都要给前端有个通知【为防止jsonModel 为空 ,全局字段 jsonModel 特意声明之后进行初始化】
                context.Response.Write("{\"result\":" + Constant.jss.Serialize(jsonModel) + "}");
            }
        }
        public void AddUser(HttpContext context)
        {
            try
            {
                HttpRequest request   = context.Request;
                string      UID       = RequestHelper.string_transfer(request, "UID");
                string      CreateUID = RequestHelper.string_transfer(request, "CreateUID");
                CreateUID = string.IsNullOrEmpty(CreateUID) ? "admin" : CreateUID;
                string LoginName = RequestHelper.string_transfer(request, "LoginName");
                string Password  = RequestHelper.string_transfer(request, "Password");
                Password = string.IsNullOrEmpty(Password) ? defaltPassword : Password;
                string Name = RequestHelper.string_transfer(request, "Name");
                //decimal Money = RequestHelper.decimal_transfer(request, "Money");
                DateTime EnableTime = RequestHelper.DateTime_transfer(request, "EnableTime");
                int      Role       = RequestHelper.int_transfer(request, "Role");
                string   Remarks    = RequestHelper.string_transfer(request, "Remarks");

                string dsp    = RequestHelper.string_transfer(request, "dsp");
                bool   result = Constant.Check_Login_DIP_Admin(UID, dsp);
                if (result)
                {
                    jsonModel = AddUser_Helper(CreateUID, LoginName, Password, Name, EnableTime, Role, Remarks);
                }
                else
                {
                    jsonModel = JsonModel.GetJsonModel(1000, "已超时");
                }
            }
            catch (Exception ex)
            {
                jsonModel = JsonModel.GetJsonModel(400, ex.Message);
                LogHelper.Error(ex);
            }
            finally
            {
                //无论后端出现什么问题,都要给前端有个通知【为防止jsonModel 为空 ,全局字段 jsonModel 特意声明之后进行初始化】
                context.Response.Write("{\"result\":" + Constant.jss.Serialize(jsonModel) + "}");
            }
        }
        public void GetUserInfo(HttpContext context)
        {
            JsonModelUser_Total jsonModelNum = null;

            try
            {
                HttpRequest request = context.Request;
                string      UID     = RequestHelper.string_transfer(request, "UID");
                string      dsp     = RequestHelper.string_transfer(request, "dsp");
                string      Key     = RequestHelper.string_transfer(request, "Key");
                bool        IsLast  = RequestHelper.bool_transfer(request, "IsLast");

                int PageIndex = RequestHelper.int_transfer(request, "PageIndex");
                int PageSize  = RequestHelper.int_transfer(request, "PageSize");

                bool result = Constant.Check_Login_DIP_Admin(UID, dsp);
                if (result)
                {
                    jsonModelNum = GetUserInfo_Helper(PageIndex, PageSize, Key, IsLast);
                }
                else
                {
                    jsonModelNum = JsonModelUser_Total.GetJsonModel(1000, "已超时");
                }
            }
            catch (Exception ex)
            {
                jsonModelNum = JsonModelUser_Total.GetJsonModel(400, ex.Message);
                LogHelper.Error(ex);
            }
            finally
            {
                //无论后端出现什么问题,都要给前端有个通知【为防止jsonModel 为空 ,全局字段 jsonModel 特意声明之后进行初始化】
                context.Response.Write("{\"result\":" + Constant.jss.Serialize(jsonModelNum) + "}");
            }
        }