Exemplo n.º 1
0
        protected void ButtonLogin_Click(object sender, EventArgs e)
        {
            CustomerUtil customer = new CustomerUtil();

            customer.userName = TextBoxUserName.Text;
            customer.password = TextBoxPassword.Text;
            if (customer.checkPassword())
            {
                Session["user"]        = TextBoxUserName.Text;
                LabelMessage.Enabled   = true;
                LabelMessage.Visible   = true;
                LabelMessage.Text      = "Welcome Back!";
                LabelMessage.ForeColor = System.Drawing.Color.White;
                Response.AddHeader("refresh", "4; url=Home.aspx");
            }
            else
            {
                LabelMessage.Enabled             = true;
                LabelMessage.Visible             = true;
                LabelMessage.Text                = "Invalid Username or Password";
                LabelMessage.ForeColor           = System.Drawing.Color.Red;
                LinkButtonForgotPassword.Enabled = true;
                LinkButtonForgotPassword.Visible = true;
            }
        }
Exemplo n.º 2
0
        protected void ButtonSubmit_Click(object sender, EventArgs e)
        {
            CustomerUtil customer = new CustomerUtil();

            customer.userName = TextBoxUsername.Text;
            customer.fName    = TextBoxFName.Text;
            customer.lName    = TextBoxLName.Text;
            customer.email    = TextBoxEmail.Text;
            customer.password = TextBoxPassword.Text;
            customer.age      = TextBoxAge.Text;
            if (RadioButtonFemale.Checked)
            {
                customer.gender = 'F';
            }
            else
            {
                customer.gender = 'M';
            }
            if (!customer.checkIfUserExists())
            {
                customer.insertData();
                LabelWelcome.Text      = "You have registered with Indiana Youth Services successfully!";
                LabelWelcome.ForeColor = System.Drawing.Color.Red;
                Response.AddHeader("refresh", "4; url=Login.aspx");
            }
            else
            {
                LabelWelcome.Text      = "User already exists!";
                LabelWelcome.ForeColor = System.Drawing.Color.Red;
                Response.AddHeader("refresh", "4; url=Registration.aspx");
            }
        }
Exemplo n.º 3
0
        protected void ButtonSubmit_Click(object sender, EventArgs e)
        {
            CustomerUtil c = new CustomerUtil();

            c.UserName = TextBoxUserName.Text;
            c.FName    = TextBoxFName.Text;
            c.LName    = TextBoxLName.Text;
            c.Email    = TextBoxEmail.Text;
            c.Country  = DropDownListCountry.SelectedItem.ToString();
            c.Password = TextBoxPassword.Text;
            c.Age      = TextBoxAge.Text;
            if (RadioButtonFemale.Checked)
            {
                c.Gender = "F";
            }
            else
            {
                c.Gender = "M";
            }
            if (c.CheckUserExist() == false)
            {
                c.InsertData();
                LabelWelcome.Text      = "You just registered with server!";
                LabelWelcome.ForeColor = Color.Red;
                Response.AddHeader("refresh", "4, url=Home.aspx");
            }//close if
            else
            {
                LabelWelcome.Text      = "User already Existed!!";
                LabelWelcome.ForeColor = Color.Red;
                Response.AddHeader("refresh", "4, url=Login.aspx");
            }
        }
Exemplo n.º 4
0
        public Hashtable GetFieldNameHash()
        {
            Hashtable hashtable;

            string[]  strArray;
            string    str;
            Hashtable hashtable2;
            bool      flag;

            hashtable = new Hashtable();
            strArray  = CustomerUtil.GetTemplateRootPath();
            if ((File.Exists(string.Format("{0}INTRADAY_PEAK_TOTAL_CAP.AutoField", strArray[1])) == 0) != null)
            {
                goto Label_002E;
            }
            goto Label_0063;
Label_002E:
            hashtable["PROV_NAME"]     = "省份名称";
            hashtable["PRESCHED_DATE"] = "申报日期";
            hashtable["UINTERVAL"]     = "交易时段";
Label_0063:
            hashtable2 = hashtable;
Label_0067:
            return(hashtable2);
        }
Exemplo n.º 5
0
        private async Task <DialogTurnResult> JumpTopDeviceOptionsStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationtoken)
        {
            var customerdata = (CustomerModel)stepContext.Values["customerinfo"];
            var company_name = "";

            if (stepContext.Result.ToString() != null)

            {
                company_name = stepContext.Result.ToString();
            }


            var companyID = CompanyUtil.SaveCompanyDetails(company_name);

            customerdata.COMPANY_ID = companyID;
            var customerID = CustomerUtil.saveCustomerInformation(customerdata.NAME, customerdata.LAST_NAME, customerdata.COMPANY_ID, customerdata.EMAIL[0].VALUE, customerdata.PHONE[0].VALUE);


            var Basket = await _botAccessors.QuoteBasket.GetAsync(stepContext.Context, () => new QuoteBasketModel());

            customerdata.ID = customerID;

            Basket.customer = customerdata;

            await _botAccessors.QuoteBasket.SetAsync(stepContext.Context, Basket, cancellationtoken);

            await stepContext.Context.SendActivityAsync(MessageFactory.Text(customerdata.ToString()));


            return(await stepContext.ReplaceDialogAsync("DeviceBOMDialog"));
        }
Exemplo n.º 6
0
        private async Task <DialogTurnResult> JumpTopDeviceOptionsStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationtoken)
        {
            var customerdata = (CustomerModel)stepContext.Values[customerInfo];
            var company_name = "";

            if (stepContext.Result.ToString() != null)

            {
                company_name = stepContext.Result.ToString();
            }


            var companyID = CompanyUtil.SaveCompanyDetails(company_name);

            customerdata.COMPANY_ID = companyID;
            var customerID = CustomerUtil.saveCustomerInformation(customerdata.NAME, customerdata.LAST_NAME, customerdata.COMPANY_ID, customerdata.EMAIL[0].VALUE, customerdata.PHONE[0].VALUE);
            await stepContext.Context.SendActivityAsync(MessageFactory.Text($"The company id is {companyID} "));


            var cacheCustomerInfo = await _botaccessors.UserProfile.GetAsync(stepContext.Context, () => new CustomerModel());

            customerdata.ID = customerID;

            cacheCustomerInfo = customerdata;

            await _botaccessors.UserProfile.SetAsync(stepContext.Context, cacheCustomerInfo, cancellationtoken);

            await stepContext.Context.SendActivityAsync(MessageFactory.Text(customerdata.ToString()));


            return(await stepContext.ReplaceDialogAsync(nameof(MerakiDeviceBoMDialog), cacheCustomerInfo));
        }
Exemplo n.º 7
0
        public Hashtable GetFieldNameHash()
        {
            Hashtable hashtable;

            string[]  strArray;
            string    str;
            Hashtable hashtable2;
            bool      flag;

            hashtable = new Hashtable();
            strArray  = CustomerUtil.GetTemplateRootPath();
            if ((File.Exists(string.Format("{0}INTRADAY_PLANT_PRESCHEDULE.AutoField", strArray[1])) == 0) != null)
            {
                goto Label_002E;
            }
            goto Label_0074;
Label_002E:
            hashtable["PLANT_NAME"]    = "电厂名称";
            hashtable["DBI_ID"]        = "D5000的ID";
            hashtable["PRESCHED_DATE"] = "预计划对应的日期";
            hashtable["UINTERVAL"]     = "交易时段";
Label_0074:
            hashtable2 = hashtable;
Label_0078:
            return(hashtable2);
        }
        public Hashtable GetFieldNameHash()
        {
            Hashtable hashtable;

            string[]  strArray;
            string    str;
            Hashtable hashtable2;
            bool      flag;

            hashtable = new Hashtable();
            strArray  = CustomerUtil.GetTemplateRootPath();
            if ((File.Exists(string.Format("{0}DAYAHEAD_RESERVE_PLANT_CAP.AutoField", strArray[1])) == 0) != null)
            {
                goto Label_002E;
            }
            goto Label_0063;
Label_002E:
            hashtable["PLANT_NAME"]    = "电厂名称";
            hashtable["DBI_ID"]        = "D5000的ID";
            hashtable["PRESCHED_DATE"] = "申报日期";
Label_0063:
            hashtable2 = hashtable;
Label_0067:
            return(hashtable2);
        }
        public Hashtable GetFieldNameHash()
        {
            Hashtable hashtable;

            string[]  strArray;
            string    str;
            Hashtable hashtable2;
            bool      flag;

            hashtable = new Hashtable();
            strArray  = CustomerUtil.GetTemplateRootPath();
            if ((File.Exists(string.Format("{0}HUAZHONG_INTRADAY_PEAK_PRICE.AutoField", strArray[1])) == 0) != null)
            {
                goto Label_002E;
            }
            goto Label_0063;
Label_002E:
            hashtable["UID"]         = "序号";
            hashtable["UINTERVAL"]   = "出清时段";
            hashtable["RESULT_DATE"] = "出清对应日期";
Label_0063:
            hashtable2 = hashtable;
Label_0067:
            return(hashtable2);
        }
        public Hashtable GetFieldNameHash()
        {
            Hashtable hashtable;

            string[]  strArray;
            string    str;
            Hashtable hashtable2;
            bool      flag;

            hashtable = new Hashtable();
            strArray  = CustomerUtil.GetTemplateRootPath();
            if ((File.Exists(string.Format("{0}INTRADAY_REVERSE_TRANS_LIMIT.AutoField", strArray[1])) == 0) != null)
            {
                goto Label_002E;
            }
            goto Label_0063;
Label_002E:
            hashtable["SECTION_NAME"]  = "断面名称";
            hashtable["PRESCHED_DATE"] = "限额对应的日期";
            hashtable["UINTERVAL"]     = "交易时段";
Label_0063:
            hashtable2 = hashtable;
Label_0067:
            return(hashtable2);
        }
        public Hashtable GetFieldNameHash()
        {
            Hashtable hashtable;

            string[]  strArray;
            string    str;
            Hashtable hashtable2;
            bool      flag;

            hashtable = new Hashtable();
            strArray  = CustomerUtil.GetTemplateRootPath();
            if ((File.Exists(string.Format("{0}INTRADAY_PEAK_POWER_PROV.AutoField", strArray[1])) == 0) != null)
            {
                goto Label_002E;
            }
            goto Label_0074;
Label_002E:
            hashtable["PROV_BUY"]    = "买方省份名称";
            hashtable["PROV_SELL"]   = "卖方省份名称";
            hashtable["RESULT_DATE"] = "出清结果对应日期";
            hashtable["INTERVEL"]    = "出清时段";
Label_0074:
            hashtable2 = hashtable;
Label_0078:
            return(hashtable2);
        }
Exemplo n.º 12
0
    /// <summary>
    /// codePoint是否是表情字符
    /// 参考java的codePointAt
    /// </summary>
    public static bool isEmojiCharacter(int codePoint)
    {
        object obj = CustomerUtil.EmojiEventInvoke("isEmojiCharacter", codePoint);

        if (obj != null)
        {
            bool result = obj is bool && (bool)obj;
            if (result)
            {
                return(true);       //lua判断是表情字符,那么就是表情字符。否则继续下面的判断
            }
        }
        return((codePoint >= 0x2600 && codePoint <= 0x27BF) || // 杂项符号与符号字体
               codePoint == 0x303D ||
               codePoint == 0x2049 ||
               codePoint == 0x203C ||
               (codePoint >= 0x2000 && codePoint <= 0x200F) || //
               (codePoint >= 0x2028 && codePoint <= 0x202F) || //
               codePoint == 0x205F ||  //
               (codePoint >= 0x2065 && codePoint <= 0x206F)    //
                                                               /* 标点符号占用区域 */
               || (codePoint >= 0x2100 && codePoint <= 0x214F) ||// 字母符号
               (codePoint >= 0x2300 && codePoint <= 0x23FF) || // 各种技术符号
               (codePoint >= 0x2B00 && codePoint <= 0x2BFF) || // 箭头A
               (codePoint >= 0x2900 && codePoint <= 0x297F) || // 箭头B
               (codePoint >= 0x3200 && codePoint <= 0x32FF) || // 中文符号
               (codePoint >= 0xD800 && codePoint <= 0xDFFF) || // 高低位替代符保留区域
               (codePoint >= 0xE000 && codePoint <= 0xF8FF) || // 私有保留区域
               (codePoint >= 0xFE00 && codePoint <= 0xFE0F) || // 变异选择器
               codePoint >= 0x10000);    // Plane在第二平面以上的,char都不可以存,全部都转
    }
        public Hashtable GetFieldNameHash()
        {
            Hashtable hashtable;

            string[]  strArray;
            string    str;
            Hashtable hashtable2;
            bool      flag;

            hashtable = new Hashtable();
            strArray  = CustomerUtil.GetTemplateRootPath();
            if ((File.Exists(string.Format("{0}DAYAHEAD_RESERVE_POWER_PLANT.AutoField", strArray[1])) == 0) != null)
            {
                goto Label_002E;
            }
            goto Label_0074;
Label_002E:
            hashtable["PLANT_NAME"]  = "电厂名称";
            hashtable["DBI_ID"]      = "D5000的ID";
            hashtable["RESULT_DATE"] = "出清结果对应日期";
            hashtable["INTERVEL"]    = "出清时段";
Label_0074:
            hashtable2 = hashtable;
Label_0078:
            return(hashtable2);
        }
Exemplo n.º 14
0
 public void ReloadCurScene()
 {
     if (!FileUtility.DirectoryDelete(Application.persistentDataPath + "/assetsdata", true))
     {
         FileUtility.DeleteDirectory(Application.persistentDataPath + "/assetsdata", true);
     }
     CustomerUtil.ReloadCurScene();
 }
Exemplo n.º 15
0
 static int QPYX_ReloadCurScene_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 0);
         CustomerUtil.ReloadCurScene();
         return(0);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Exemplo n.º 16
0
 static int QPYX_UnRegisterLogCallback_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 0);
         CustomerUtil.UnRegisterLogCallback();
         return(0);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Exemplo n.º 17
0
 static int QPYX_UnloadUnusedAssets_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 0);
         CustomerUtil.UnloadUnusedAssets();
         return(0);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Exemplo n.º 18
0
        public LuaException(string msg, Exception e = null, int skip = 1)
            : base(msg)
        {
            if (e != null)
            {
                if (e is LuaException)
                {
                    _stack = e.StackTrace;
                }
                else
                {
                    StackTrace    trace = new StackTrace(e, true);
                    StringBuilder sb    = new StringBuilder();
                    ExtractFormattedStackTrace(trace, sb);
                    StackTrace self = new StackTrace(skip, true);
                    ExtractFormattedStackTrace(self, sb, trace);
                    _stack = sb.ToString();
                }
            }
            else
            {
                StackTrace    self = new StackTrace(skip, true);
                StringBuilder sb   = new StringBuilder();
                ExtractFormattedStackTrace(self, sb);
                _stack = sb.ToString();
            }

            string content = ToString();

            //上报错误信息
            if (!content.IsNullOrEmpty())
            {
                // #if DEBUG
                //     Debugger.LogException(this);
                // #endif
                CustomerUtil.CustomEventCallback("LuaException", content);
                if (!UnityEngine.Application.isEditor && (GameConfigProject.instance.developmentMode || UnityEngine.Application.platform == RuntimePlatform.WindowsPlayer))
                {
                    if (ExceptionShow.Instance == null)
                    {
                        ExceptionShow.IsShowExc = true;
                        new GameObject().AddComponent <ExceptionShow>();
                    }
                    if (ExceptionShow.IsShowExc)
                    {
                        ExceptionShow.strException += content;
                    }
                }
                // BuglyAgent.ReportException(this, "LuaException");
                // DCAgent.reportError("LuaException", content);
            }
        }
Exemplo n.º 19
0
 static int QPYX_FileLog_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 1);
         string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
         CustomerUtil.FileLog(QPYX_arg0_YXQP);
         return(0);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Exemplo n.º 20
0
 static int QPYX_GenerateEmptyStringStringDic_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 0);
         System.Collections.Generic.Dictionary <string, string> QPYX_o_YXQP = CustomerUtil.GenerateEmptyStringStringDic();
         ToLua.PushSealed(L_YXQP, QPYX_o_YXQP);
         return(1);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Exemplo n.º 21
0
 static int QPYX_GetUtcGMT_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 0);
         string QPYX_o_YXQP = CustomerUtil.GetUtcGMT();
         LuaDLL.lua_pushstring(L_YXQP, QPYX_o_YXQP);
         return(1);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Exemplo n.º 22
0
 static int UnRegisterLogCallback(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         CustomerUtil.UnRegisterLogCallback();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 23
0
 static int ReloadCurScene(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         CustomerUtil.ReloadCurScene();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 24
0
 static int UnloadUnusedAssets(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         CustomerUtil.UnloadUnusedAssets();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 25
0
 static int ScreenShot(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         string arg0 = ToLua.CheckString(L, 1);
         CustomerUtil.ScreenShot(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 26
0
 static int QPYX_CustomEventCallback_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 2);
         string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
         string QPYX_arg1_YXQP = ToLua.CheckString(L_YXQP, 2);
         CustomerUtil.CustomEventCallback(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
         return(0);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Exemplo n.º 27
0
 static int QPYX_GetBytesMD5_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 1);
         byte[] QPYX_arg0_YXQP = ToLua.CheckByteBuffer(L_YXQP, 1);
         string QPYX_o_YXQP    = CustomerUtil.GetBytesMD5(QPYX_arg0_YXQP);
         LuaDLL.lua_pushstring(L_YXQP, QPYX_o_YXQP);
         return(1);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Exemplo n.º 28
0
 static int GenerateEmptyStringStringDic(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         System.Collections.Generic.Dictionary <string, string> o = CustomerUtil.GenerateEmptyStringStringDic();
         ToLua.PushSealed(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 29
0
 static int GetUtcGMT(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         string o = CustomerUtil.GetUtcGMT();
         LuaDLL.lua_pushstring(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 30
0
 static int QPYX_StartCoroutineToWaitOneFrame_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 2);
         UnityEngine.MonoBehaviour QPYX_arg0_YXQP = (UnityEngine.MonoBehaviour)ToLua.CheckObject <UnityEngine.MonoBehaviour>(L_YXQP, 1);
         System.Action             QPYX_arg1_YXQP = (System.Action)ToLua.CheckDelegate <System.Action>(L_YXQP, 2);
         CustomerUtil.StartCoroutineToWaitOneFrame(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
         return(0);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }