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"; }
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"; }
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"; }
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); } }
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")); }
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; }
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); } }
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"; }
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"; }
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 }
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"; }
public void Add(string phone, CodeData code) { lock (Codes) { Codes.Remove(phone); Codes.Add(phone, code); } }
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); } }
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(); } } } }
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 = ""; }
public void StartEvent() { _readNow = true; try { _nowCodeData = _codeList.Dequeue(); _nowCodeData.CodeAction(); } catch (System.InvalidOperationException) { _nowCodeData = new EndCode(); } }
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); } }
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); } }
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"; }
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); } }
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"; }
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"; } }
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); } }
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(); }
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)); }
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"; }
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 = ""; }
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"; }
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); } }
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); } }
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"); }); } }
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()); }
public static bool Exit(CodeData c,Form1 form) { Application.Exit(); return true; }
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; }
public static bool ChangeDirectoryParent(CodeData c,Form1 form) { return ChangeDirectory(new CodeData("cd .."), form); }
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; }
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; }
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; }