コード例 #1
0
ファイル: frmSCM03.cs プロジェクト: cho68518/YL_Land_BizFrm
        private void SetCmb()
        {
            // 공급자구분
            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = "SELECT ifnull(s_idx,'') as DCODE ,s_company_name as DNAME  FROM domaadmin.tb_sellers_info where s_status = 'Y' order by s_company_name ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbSellers, codeArray);
            }
            dtS_DATE.EditValue   = DateTime.Now;
            dtE_DATE.EditValue   = DateTime.Now;
            cmbSellers.EditValue = "1";
        }
コード例 #2
0
ファイル: frmMM15.cs プロジェクト: cho68518/YL_Land_BizFrm
        private void SetCmb()
        {
            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = " select code_id as DCODE ,code_nm as DNAME  from domaadmin.tb_common_code  where gcode_id = '00028'   ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbDoma_Money, codeArray);
                CodeAgent.MakeCodeControl(this.cmbVip_Money, codeArray);
                CodeAgent.MakeCodeControl(this.cmbChef_Money, codeArray);
                CodeAgent.MakeCodeControl(this.cmbMd_Money, codeArray);
                CodeAgent.MakeCodeControl(this.cmbGshop_Money, codeArray);
            }
            cmbDoma_Money.EditValue  = "0";
            cmbVip_Money.EditValue   = "0";
            cmbChef_Money.EditValue  = "0";
            cmbMd_Money.EditValue    = "0";
            cmbGshop_Money.EditValue = "0";
        }
コード例 #3
0
ファイル: frmRM02.cs プロジェクト: cho68518/YL_Land_BizFrm
        private void SetCmb()
        {
            try
            {
                using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
                {
                    con.Query = " SELECT board_cd as DCODE ,board_name as DNAME  FROM domalife.g_board where is_use = 'Y' order by board_cd ";

                    DataSet ds = con.selectQueryDataSet();
                    //DataTable retDT = ds.Tables[0];
                    DataRow[]  dr        = ds.Tables[0].Select();
                    CodeData[] codeArray = new CodeData[dr.Length];

                    for (int i = 0; i < dr.Length; i++)
                    {
                        codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                    }

                    CodeAgent.MakeCodeControl(this.cmbBoard, codeArray);
                }
            }
            catch (Exception ex)
            {
                MessageAgent.MessageShow(MessageType.Error, ex.ToString());
            }
            cmbBoard.EditValue = "01";
        }
コード例 #4
0
ファイル: frmGSHOP11.cs プロジェクト: cho68518/YL_Land_BizFrm
        private void cmbPlace1_1_EditValueChanged(object sender, EventArgs e)
        {
            if (this.cmbPlace1_1.EditValue == null)
            {
                return;
            }

            string sPlace1_1 = cmbPlace1_1.Text.ToString();

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = "SELECT count(*) as DCODE, place2  as DNAME  FROM  domabiz.beauty_shop where place1 = " + "'" + sPlace1_1 + "'" + " group by place2 ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbPlace2_1, codeArray);
            }
        }
コード例 #5
0
        public ActionResult Checkout()
        {
            string username = (string)Session["username"];
            int    coin     = (int)Session["coin"];
            Cart   cart     = (Cart)Session["cart"];

            if ((int)Session["coin"] < cart.Items.Sum(x => x.Quantity * x.product.Price))
            {
                return(RedirectToAction("ViewCart", "Cart"));
            }
            else
            {
                foreach (Item it in cart.Items)
                {
                    for (int i = it.Quantity; i > 0; i--)
                    {
                        Guid     GI        = Guid.NewGuid();
                        int      userid    = UserData.GetId(username);
                        int      productid = it.ProductId;
                        DateTime od        = DateTime.Today;

                        ActCode newcode = new ActCode(userid, productid, GI, od);
                        CodeData.AddCode(newcode);
                        coin -= it.product.Price;

                        cart.Items.Where(x => x.ProductId == it.ProductId).FirstOrDefault().Quantity -= 1;
                    }

                    UserData.UpdateCoin(username, coin);
                    Session["coin"] = coin;
                }
            }

            return(RedirectToAction("MyPurchases", "Purchases"));
        }
コード例 #6
0
 public static bool ChangeDirectory(CodeData c,Form1 form)
 {
     if (c.MainArgument == c.CodeName)
     {
         form.MessageAdd(form.OptionValue.NowDirectory);
         return true;
     }
     if(c.MainArgument=="..")
     {
         form.OptionValue.NowDirectory = Directory.GetParent(form.OptionValue.NowDirectory).FullName;
         form.MessageAdd(form.OptionValue.NowDirectory);
         return true;
     }
     else
     {
         var d = Path.Combine(form.OptionValue.NowDirectory, c.MainArgument);
         if (!Directory.Exists(d))
         {
             MessageBox.Show(AddQuote(c.MainArgument) + "は存在しません", "エラー", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
             form.MessageAdd(AddQuote(c.MainArgument) + "は存在しません");
             return true;
         }
         form.OptionValue.NowDirectory = d;
         form.MessageAdd(form.OptionValue.NowDirectory);
     }
     return true;
 }
コード例 #7
0
ファイル: ZenviaSMS.cs プロジェクト: radtek/safeid
        public override Boolean iSendCode(Dictionary <String, Object> config, CodeData target, String code)
        {
            try
            {
                SimpleSending sms = new SimpleSending(config["account"].ToString(), config["password"].ToString());

                SimpleMessage message = new SimpleMessage();

                message.To      = target.ClearData;
                message.Message = "Use " + code + " como codigo de recuperacao da sua conta";
                message.Id      = DateTime.Now.ToString("HHmmss");

                // Whit Proxy
                // sms.Proxy = new WebProxy("host_proxy", 3128);

                List <String> response = sms.send(message);

                //000 - Message Sent
                foreach (String resp in response)
                {
                    if (resp.ToLower().IndexOf("message sent") != -1)
                    {
                        return(true);
                    }
                }

                return(false);
            }
            catch (Exception ex)
            {
                Log(CodePluginLogType.Error, "Error sending SMS: " + ex.Message);
                return(false);
            }
        }
コード例 #8
0
ファイル: frmRM04.cs プロジェクト: cho68518/YL_Land_BizFrm
        private void SetCmb()
        {
            try
            {
                using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
                {
                    con.Query = " SELECT code_id as DCODE ,code_nm as DNAME  FROM domaadmin.tb_common_code where gcode_id = '00049' order by code_id ";

                    DataSet ds = con.selectQueryDataSet();
                    //DataTable retDT = ds.Tables[0];
                    DataRow[]  dr        = ds.Tables[0].Select();
                    CodeData[] codeArray = new CodeData[dr.Length];

                    for (int i = 0; i < dr.Length; i++)
                    {
                        codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                    }

                    CodeAgent.MakeCodeControl(this.cmbBoard_Type, codeArray);
                }
            }
            catch (Exception ex)
            {
                MessageAgent.MessageShow(MessageType.Error, ex.ToString());
            }
            cmbBoard_Type.EditValue = "0";
        }
コード例 #9
0
        private void SetCmb()
        {
            // 회원검색

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = "SELECT code_id as DCODE, code_nm  as DNAME  FROM  domabiz.tb_member_grant_master group by code_id, code_nm  ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbMember_Search, codeArray);
            }

            cmbMember_Search.EditValue = "4";
        }
コード例 #10
0
        private void Button_Start_Update_Click(object sender, EventArgs e)
        {
            #region 更新確認処理
            DialogResult dr_YESNO = MessageBox.Show("グループ名を更新しますか?",
                                                    "更新",
                                                    MessageBoxButtons.YesNo,
                                                    MessageBoxIcon.Information);

            if (dr_YESNO == DialogResult.No)
            {
                return;
            }
            #endregion

            CodeData codeData = new CodeData(TextBox_UserNo_UserMst.Text);

            for (int rowCount = 0; rowCount < DataGridView_TaskGroup_UserMst.Rows.Count; rowCount++)
            {
                Code taskGroupCode = new Code(DataGridView_TaskGroup_UserMst.Rows[rowCount].Cells[0].Value.ToString(),
                                              DataGridView_TaskGroup_UserMst.Rows[rowCount].Cells[1].Value.ToString()
                                              );

                // タスクグループ名を更新する。
                // TaskGroupMstUpdate(タスクグループコードインスタンス)
                codeData.TaskGroupMstUpdate(taskGroupCode);
            }

            #region 更新通知処理
            DialogResult dr_OK = MessageBox.Show("更新が完了しました。",
                                                 "更新",
                                                 MessageBoxButtons.OK,
                                                 MessageBoxIcon.Information);
            #endregion
        }
コード例 #11
0
ファイル: frmDT01.cs プロジェクト: cho68518/YL_Land_BizFrm
        private void SetCmb()
        {
            // 회원검색

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = "SELECT code_id as DCODE, code_nm  as DNAME  FROM  domaadmin.tb_common_code where gcode_id = '00047' and code_id != 'AD' order by seq  ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbDonut_Type, codeArray);
                CodeAgent.MakeCodeControl(this.cmbDonut_Type1, codeArray);
            }

            cmbDonut_Type.EditValue  = "0";
            cmbDonut_Type1.EditValue = "0";
        }
コード例 #12
0
 public void Add(string phone, CodeData code)
 {
     lock (Codes)
     {
         Codes.Remove(phone);
         Codes.Add(phone, code);
     }
 }
コード例 #13
0
        private void SetCmb()
        {
            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = " SELECT code_id as DCODE ,code_nm as DNAME  FROM domaadmin.tb_common_code where gcode_id = 00042 order by code_id ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbO_Sub_Company, codeArray);
            }

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = " SELECT code_id as DCODE ,code_nm as DNAME  FROM domaadmin.tb_common_code where gcode_id = 00041 order by code_id ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbO_Company, codeArray);
            }

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = " SELECT code_id as DCODE ,code_nm as DNAME  FROM domaadmin.tb_common_code where gcode_id = 00042 order by code_id ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbO_Sub_Company1, codeArray);
            }
        }
コード例 #14
0
        private void SetPic()
        {
            picImg1.Image = null;
            picImg2.Image = null;
            picImg3.Image = null;
            picImg4.Image = null;
            picImg5.Image = null;

            lblpic1.Text = "";
            lblpic2.Text = "";
            lblpic3.Text = "";
            lblpic4.Text = "";
            lblpic5.Text = "";

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = "SELECT image_url FROM domalife.y_thumbnail_list WHERE contents_id = " + pSTORY_ID;
                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                //pictureEdit.Image = Image.FromFile(@"c:\sample.jpg");
                for (int i = 0; i < dr.Length; i++)
                {
                    if (i == 0)
                    {
                        picImg1.LoadAsync(dr[i]["image_url"].ToString());
                        lblpic1.Text = dr[i]["image_url"].ToString();
                    }
                    else if (i == 1)
                    {
                        picImg2.LoadAsync(dr[i]["image_url"].ToString());
                        lblpic2.Text = dr[i]["image_url"].ToString();
                    }
                    else if (i == 2)
                    {
                        picImg3.LoadAsync(dr[i]["image_url"].ToString());
                        lblpic3.Text = dr[i]["image_url"].ToString();
                    }
                    else if (i == 3)
                    {
                        picImg4.LoadAsync(dr[i]["image_url"].ToString());
                        lblpic4.Text = dr[i]["image_url"].ToString();
                    }
                    else if (i == 4)
                    {
                        picImg5.LoadAsync(dr[i]["image_url"].ToString());
                        lblpic5.Text = dr[i]["image_url"].ToString();
                    }
                }
            }
        }
コード例 #15
0
        private void SetCmb()
        {
            // 회원검색

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = "SELECT code_id as DCODE, code_nm  as DNAME  FROM  domaadmin.tb_common_code where gcode_id = '00034'  ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbMember_Search, codeArray);
            }

            cmbMember_Search.EditValue = "01";

            // 스토리

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = "SELECT category_no as DCODE, story_name  as DNAME  FROM  domaadmin.tb_story_info order by id  ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbStory, codeArray);
            }

            cmbStory.EditValue = "";
        }
コード例 #16
0
    public void StartEvent()
    {
        _readNow = true;

        try
        {
            _nowCodeData = _codeList.Dequeue();
            _nowCodeData.CodeAction();
        }
        catch (System.InvalidOperationException)
        {
            _nowCodeData = new EndCode();
        }
    }
コード例 #17
0
 public CodeData FindCode(string CountryCode, string PhoneNum)
 {
     lock (Codes)
     {
         if (Codes.ContainsKey(CountryCode + PhoneNum))
         {
             CodeData d = Codes[CountryCode + PhoneNum];
             if (!d.HasExp())
             {
                 return(d);
             }
         }
         return(null);
     }
 }
コード例 #18
0
 public static bool Directories(CodeData c,Form1 form)
 {
     if (c.MainArgument == c.CodeName)
     {
         var d = Directory.GetDirectories(form.OptionValue.NowDirectory);
         foreach(var str in d)
         {
             form.MessageAdd((new DirectoryInfo(str)).Name);
         }
         return true;
     }
     else
     {
         return ChangeDirectory(c, form);
     }
 }
コード例 #19
0
        private void SetCmb()
        {
            // 공급자구분
            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = " select '0' as DCODE, '선택하세요' DNAME  UNION all SELECT ifnull(s_idx,'') as DCODE ,s_company_name as DNAME  FROM domaadmin.tb_sellers_info where s_status = 'Y'   ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbSellers, codeArray);
            }
            cmbSellers.EditValue = "0";



            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = " select code_id as DCODE, code_nm as DNAME  FROM domaadmin.tb_common_code  where gcode_id = '00030'   ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbQuery, codeArray);
            }
            cmbQuery.EditValue = "0";
        }
コード例 #20
0
ファイル: frmGSHOP04.cs プロジェクト: cho68518/YL_Land_BizFrm
        private void CmbTAREA1_EditValueChanged(object sender, EventArgs e)
        {
            string sCSIDO = string.Empty;

            //if (cmbTAREA1.EditValue.ToString() == null && cmbTAREA1.EditValue.ToString() == "")
            //if (cmbTAREA1.EditValue.ToString() == "")
            //{
            //    sCSIDO = "00";
            //}
            //else
            //{
            sCSIDO = cmbTAREA1.EditValue.ToString();
            //}



            if (string.IsNullOrEmpty(this.cmbTAREA1.EditValue.ToString()))
            {
                return;
            }


            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                //con.Query = "select DCODE, DNAME from ( select gugun as DCODE, concat(gugun_nm, IFNULL((select '   ( 선점 )' from domabiz.md_place where sido = a.sido and gugun = a.gugun), '')) as DNAME from domabiz.place_master a  where sido = " + sCSIDO + "  ) AS t1 group by dcode, dname ";
                con.Query = "select DCODE, DNAME from " +
                            " ( select ifnull(gugun,'00') as DCODE, " +
                            "          concat(gugun_nm, IFNULL((select '   ( 선점 )' from domabiz.md_place where sido = a.sido and gugun = a.gugun), '')) as DNAME " +
                            "     from domabiz.place_master a  " +
                            "    where sido = " + sCSIDO + "  ) AS t1 " +
                            "group by dcode, dname ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();
                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbSAREA1, codeArray);
            }
        }
コード例 #21
0
        private void setCmb()
        {
            using (MySQLConn con = new MySQLConn(ConstantLib.TelConn_Real))
            {
                con.Query = " select '' as DCODE, '선택하세요' DNAME  UNION all SELECT ifnull(s_idx,'') as DCODE ,s_company_name as DNAME  FROM erp.tb_sellers_info where s_status = 'Y'   ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbAgencyCode, codeArray);
            }
            cmbAgencyCode.EditValue = "";


            using (MySQLConn con = new MySQLConn(ConstantLib.TelConn_Real))
            {
                //  con.Query = " SELECT ifnull(code_id,'') as DCODE ,code_nm as DNAME  FROM erp.tb_common_code where gcode_id = '00003'   ";
                con.Query = " SELECT idx_fac as DCODE, u_name as DNAME  FROM telecom.tb_admin_masters where idx_fac = 4099   ";
                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbFactory, codeArray);
            }
            cmbFactory.EditValue = "4099";
        }
コード例 #22
0
        private void SetCmb()
        {
            // 공급자구분

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = "SELECT code_id as DCODE ,code_nm  as DNAME  FROM  domaadmin.tb_common_code  where gcode_id = '00010' and use_yn = 'Y' order by code_id ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbEvent, codeArray);
            }

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = "SELECT d_code as DCODE ,d_name as DNAME  FROM domamall.tb_am_product_delivers  order by sort ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbDelivery_Company, codeArray);
                cmbDelivery_Company.EditValue = "08";
            }
        }
コード例 #23
0
        public static void Send(PhoneGetCodeInfo newPhoneLoginInfo, HttpContext page)
        {
            RetureCode newRetureCode = new RetureCode();

            try
            {
                CodeData OldData = PhoneCode.GPhoneCode.FindCode(newPhoneLoginInfo.CountryCode, newPhoneLoginInfo.PhoneNum);
                string   Ps      = CreatePassWord();
                if (OldData != null)
                {
                    Ps = OldData.CodeNum;
                }
                if (newPhoneLoginInfo != null)
                {
                    if (AliProgram.Send(newPhoneLoginInfo.PhoneNum, Ps))
                    {
                        newRetureCode.code = 0;
                        newRetureCode.msg  = Ps;
                        SendStringToClient(page, LitJson.JsonMapper.ToJson(newRetureCode));
                        CodeData Data = new CodeData();
                        Data.CountryCode = newPhoneLoginInfo.CountryCode;
                        Data.PhoneNum    = newPhoneLoginInfo.PhoneNum;
                        Data.CodeNum     = Ps;
                        PhoneCode.GPhoneCode.Add(newPhoneLoginInfo.CountryCode + newPhoneLoginInfo.PhoneNum, Data);
                    }
                    else
                    {
                        newRetureCode.code = 1;
                        SendStringToClient(page, LitJson.JsonMapper.ToJson(newRetureCode));
                    }
                }
                else
                {
                    newRetureCode.code = 2;
                    SendStringToClient(page, LitJson.JsonMapper.ToJson(newRetureCode));
                    Debug.LogError("GetPhoneCode", LitJson.JsonMapper.ToJson(newRetureCode));
                }
            }
            catch (Exception ep)
            {
                newRetureCode.code = 3;
                SendStringToClient(page, LitJson.JsonMapper.ToJson(newRetureCode));
                Debug.LogException(ep);
            }
        }
コード例 #24
0
        public Client(Socket socket, Server server)
        {
            message   = new Message();
            userData  = new UserData();
            emailCode = new EmailCode();
            //userController = new UserController();
            codeData       = new CodeData();
            roleData       = new DAO.CharacterData();
            itemData       = new DAO.ItemData();
            friendData     = new DAO.FriendData();
            checkpointData = new DAO.CheckpointData();


            this.socket = socket;
            this.server = server;

            StartReceive();
        }
コード例 #25
0
ファイル: PhoneBind.ashx.cs プロジェクト: dingfengwu/TTFRONT
        public void ProcessRequest(HttpContext context)
        {
            RetureCode   newRetureCode = new RetureCode();
            Stream       sm            = context.Request.InputStream;
            StreamReader inputData     = new StreamReader(sm);
            string       DataString    = inputData.ReadToEnd();

            try
            {
                BindPhoneNum newPhoneLoginInfo = LitJson.JsonMapper.ToObject <BindPhoneNum>(DataString);
                CodeData     _CodeData         = PhoneCode.GPhoneCode.CheckCode(newPhoneLoginInfo.CountryCode,
                                                                                newPhoneLoginInfo.PhoneNum, newPhoneLoginInfo.PhoneCode);
                if (_CodeData == null)
                {
                    newRetureCode.code = 4;
                    newRetureCode.msg  = "无效验证码";
                    PhoneCodeLogin.SendStringToClient(context, LitJson.JsonMapper.ToJson(newRetureCode));
                    return;
                }
                string Passw = CommonTools.CreatePassWord(12);
                if (BindAccount(newPhoneLoginInfo.AccountId,
                                _CodeData.PhoneNum, CommonTools.GetMD5Hash(Passw), newPhoneLoginInfo.Mac, newRetureCode))
                {
                    newRetureCode.code = 0;
                    newRetureCode.msg  = Passw;
                    AppleInapp.AddScoreByBinding(300, newPhoneLoginInfo.AccountId);
                    JsonEMail newJsonEMail = new JsonEMail();
                    newJsonEMail.dwUserID  = newPhoneLoginInfo.AccountId;
                    newJsonEMail.nStatus   = 0;
                    newJsonEMail.szTitle   = "绑定成功";
                    newJsonEMail.szMessage = "绑定成功手机号,赠送3.00";
                    newJsonEMail.szSender  = "系统";
                    newJsonEMail.nType     = 0;
                    newJsonEMail.nStatus   = 0;
                    EmailAdd.AddEmail(newJsonEMail);
                }
            }
            catch (Exception exp)
            {
                newRetureCode.code = 100;
                newRetureCode.msg  = DataString + "--" + exp.Message.ToString() + "-" + exp.StackTrace;
            }
            PhoneCodeLogin.SendStringToClient(context, LitJson.JsonMapper.ToJson(newRetureCode));
        }
コード例 #26
0
        private void setCmb()
        {
            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = " select '' as DCODE, '선택하세요' DNAME  UNION all SELECT ifnull(code_id,'') as DCODE ,code_nm as DNAME  FROM domaadmin.tb_common_code where gcode_id = '00051'   ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmb_advice_type, codeArray);
            }
            cmb_advice_type.EditValue = "1";

            using (MySQLConn con = new MySQLConn(ConstantLib.TelConn_Real))
            {
                con.Query = " select '' as DCODE, '선택하세요' DNAME  UNION all SELECT ifnull(code_id,'') as DCODE ,code_nm as DNAME  FROM erp.tb_common_code where gcode_id = '00002'   ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmb_move_type, codeArray);
            }
            // cmb_move_type.EditValue = "1";
        }
コード例 #27
0
ファイル: frmMM12.cs プロジェクト: cho68518/YL_Land_BizFrm
        private void setCmb()
        {
            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = " select  ifnull(code_id,'') as DCODE ,code_nm as DNAME  FROM domaadmin.tb_common_code where gcode_id = '00026'   ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbU_Chef_Level, codeArray);
            }
            cmbU_Chef_Level.EditValue = "1";

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = " select  '' as DCODE, '선택하세요' as DNAME union all select  ifnull(code_id,'') as DCODE ,code_nm as DNAME  FROM domaadmin.tb_common_code where gcode_id = '00026'   ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbOrderMallTypeQ, codeArray);
            }
            cmbOrderMallTypeQ.EditValue = "";
        }
コード例 #28
0
ファイル: frmGSHOP04.cs プロジェクト: cho68518/YL_Land_BizFrm
        private void SetCmb()
        {
            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = " SELECT ifnull(sido,'00') as DCODE ,ifnull(sido_nm,'전국') as DNAME  FROM domabiz.place_master GROUP BY sido, sido_nm ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbTAREA1, codeArray);
            }

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = " SELECT ifnull(code_id,'') as DCODE ,code_nm as DNAME  FROM domaadmin.tb_common_code where gcode_id = '00043'   ";

                DataSet ds = con.selectQueryDataSet();
                //DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                // cmbTAREA1.EditValue = "";
                // cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbOrderDate, codeArray);
            }
            cmbOrderDate.EditValue = "1";
        }
コード例 #29
0
 public CodeData CheckCode(string CountryCode, string PhoneNum, string CodeNum)
 {
     lock (Codes)
     {
         if (Codes.ContainsKey(CountryCode + PhoneNum))
         {
             CodeData d = Codes[CountryCode + PhoneNum];
             if (d.CodeNum == CodeNum)
             {
                 Codes.Remove(CountryCode + PhoneNum);
                 if (!d.HasExp())
                 {
                     return(d);
                 }
             }
         }
         return(null);
     }
 }
コード例 #30
0
        private void setCmb()
        {
            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = "select '0' as DCODE, '전체' as DNAMe union all SELECT category_no as DCODE ,story_name as DNAME  FROM domaadmin.tb_story_info ORDER BY 1 ";

                DataSet ds = con.selectQueryDataSet();
                ////DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                //// cmbTAREA1.EditValue = "";
                //// cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbStory, codeArray);
            }

            using (MySQLConn con = new MySQLConn(ConstantLib.BasicConn_Real))
            {
                con.Query = " SELECT code_id as DCODE ,code_nm as DNAME  FROM domaadmin.tb_common_code where gcode_id = '00029' ";

                DataSet ds = con.selectQueryDataSet();
                ////DataTable retDT = ds.Tables[0];
                DataRow[]  dr        = ds.Tables[0].Select();
                CodeData[] codeArray = new CodeData[dr.Length];

                //// cmbTAREA1.EditValue = "";
                //// cmbTAREA1.EditValue = ds.Tables[0].Rows[0]["RESIDENTTYPE"].ToString();

                for (int i = 0; i < dr.Length; i++)
                {
                    codeArray[i] = new CodeData(dr[i]["DCODE"].ToString(), dr[i]["DNAME"].ToString());
                }

                CodeAgent.MakeCodeControl(this.cmbWriteYn, codeArray);
            }
        }
コード例 #31
0
        public void NotifyAboutGet()
        {
            Interlocked.Increment(ref _getCount);

            if (_getCount == _desiredGetCount)
            {
                Task.Run(() =>
                {
                    var sw = new Stopwatch();
                    sw.Start();
                    Console.WriteLine($"{DateTime.Now.ToLongTimeString()} Started preparation for POST");

                    //_swMemory = new System.Timers.Timer(1000);
                    //_swMemory.Elapsed += (sender, args) => { TotalMemoryHelper.Show(); };
                    //_swMemory.Start();

                    StatusData.PrepareForUpdates();
                    CityData.PrepareForUpdates();
                    CountryData.PrepareForUpdates();
                    SNameData.PrepareForUpdates();

                    FNameData.PrepareForUpdates();
                    SexData.PrepareForUpdates();
                    PremiumData.PrepareForUpdates();
                    CodeData.PrepareForUpdates();

                    DomainData.PrepareForUpdates();
                    BirthYearData.PrepareForUpdates();
                    InterestsData.PrepareForUpdates();
                    JoinedYearData.PrepareForUpdates();

                    TotalMemoryHelper.Show();
                    GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
                    GC.Collect();
                    GC.WaitForFullGCApproach();
                    TotalMemoryHelper.Show();


                    Console.WriteLine($"{DateTime.Now.ToLongTimeString()} Finished preparation for POST in {sw.ElapsedMilliseconds} ms");
                });
            }
        }
コード例 #32
0
        public ActionResult MyPurchases()
        {
            List <ActCode> LAbU   = new List <ActCode>();
            List <Product> LP     = new List <Product>();
            int            userid = UserData.GetId((string)Session["username"]);

            Session["page"] = "purchases";



            LAbU = CodeData.GetCodebyUserId(userid);
            LP   = ProductData.GetAllProducts();

            ViewData["labu"] = LAbU;
            ViewBag.RList    = LP;



            return(View());
        }
コード例 #33
0
 public static bool Exit(CodeData c,Form1 form)
 {
     Application.Exit();
     return true;
 }
コード例 #34
0
        public static bool Load(CodeData c,Form1 form)
        {
            var path = Path.Combine(form.OptionValue.NowDirectory, c.MainArgument);
            try
            {
                var str = File.ReadAllText(path);
                form.editSpace.Text = str;
                form.Text = "Editor:" + path;
                form.OptionValue.OpenFilePath = path;
                form.MessageAdd(AddQuote(path) + "を開きました");

            }
            catch (Exception)
            {
                MessageBox.Show(AddQuote(path) + "が開けません", "エラー", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                form.MessageAdd(AddQuote(path) + "が開けません");
            }
            return true;
        }
コード例 #35
0
 public static bool ChangeDirectoryParent(CodeData c,Form1 form)
 {
     return ChangeDirectory(new CodeData("cd .."), form);
 }
コード例 #36
0
 public static bool Set(CodeData c, Form1 form)
 {
     if (c.OptionValue.ContainsKey("saveconf"))
     {
         try
         {
             form.OptionValue.SaveConf = bool.Parse(c.OptionValue["saveconf"]);
         }
         catch (Exception)
         {
             MessageBox.Show(AddQuote(c.OptionValue["saveconf"]) + ":無効な値です", "setエラー", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
         }
     }
     return true;
 }
コード例 #37
0
 public static bool Save(CodeData c,Form1 form)
 {
     var conf = c.OptionValue.ContainsKey("conf") ? (bool.Parse(c.OptionValue["conf"])) : form.OptionValue.SaveConf;
     var path =
         c.MainArgument == c.CodeName ?
         form.OptionValue.OpenFilePath:
         Path.Combine(form.OptionValue.NowDirectory, c.MainArgument);
     if(conf)
     {
         if (MessageBox.Show(
             AddQuote(path) + "に保存しますか",
             "確認",
             MessageBoxButtons.YesNo,
             MessageBoxIcon.Exclamation,
             MessageBoxDefaultButton.Button1) !=
                 DialogResult.Yes)
         {
             return true;
         }
     }
     try
     {
         File.WriteAllText(path, form.editSpace.Text);
         form.MessageAdd(AddQuote(path) + "に保存しました");
     }
     catch (Exception)
     {
         MessageBox.Show(AddQuote(path) + "に書き込めません", "エラー", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
         form.MessageAdd(AddQuote(path) + "に書き込めません");
     }
     return true;
 }
コード例 #38
0
        public static bool Run(string code,Form1 form)
        {
            var c = new CodeData(code);
            if (!CodeFunctions.ContainsKey(c.CodeName))
            {
                return false;
            }
            form.MessageAdd(code);
            CodeFunctions[c.CodeName](c, form);

            return true;
        }