private void Btn3_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.txt_o_u_id.Text) || string.IsNullOrEmpty(this.txt_o_code.Text)) { return; } using (MySQLConn sql = new MySQLConn(ConstantLib.BasicConn_Real)) { sql.Query = "select ifnull(td_donut,0) " + " from domamall.z_product_masters " + " where p_id = " + Convert.ToInt32(txt_p_id.EditValue.ToString()); DataSet ds = sql.selectQueryDataSet(); int ncnt = Convert.ToInt32(sql.selectQueryForSingleValue()); if (ncnt > 0) { lblRes1.Text = ncnt.ToString(); } else { lblRes1.Text = "0"; } } }
private int MonthDataCnt() { int nCnt = 0; using (MySQLConn sql = new MySQLConn(ConstantLib.BasicConn_Real)) { sql.Query = "SELECT count(*) FROM domamall.tb_ps_charge_month " + "WHERE yymm = '" + dtS_DATE.EditValue3.Substring(0, 6) + "' and LENGTH(acc_date) > 0 and p_type = '01' "; DataSet ds = sql.selectQueryDataSet(); nCnt = Convert.ToInt32(sql.selectQueryForSingleValue()); } dtAcc_Date.EditValue = ""; string sAccDate; using (MySQLConn sql = new MySQLConn(ConstantLib.BasicConn_Real)) { sql.Query = "SELECT date_format(acc_date, '%Y-%m-%d') FROM domamall.tb_ps_charge_month " + "WHERE yymm = '" + dtS_DATE.EditValue3.Substring(0, 6) + "' and LENGTH(acc_date) > 0 and p_type = '01' group by acc_date "; DataSet ds = sql.selectQueryDataSet(); sAccDate = sql.selectQueryForSingleValue(); } dtAcc_Date.EditValue = sAccDate; return(nCnt); }
private void gridView1_DoubleClick(object sender, EventArgs e) { var gv = sender as GridView; var rowIndex = gv.FocusedRowHandle; var columnIndex = gv.FocusedColumn.VisibleIndex; if (columnIndex == 5) { DataRow dr = this.efwGridControl1.GetSelectedRow(0); int nId = Convert.ToInt32(txtId.EditValue.ToString()); if (nId != 0) { this.txtId.EditValue = dr["id"].ToString(); popup = new frmDN01_Pop01(); popup.Id = Convert.ToInt32(txtId.EditValue.ToString()); txtId.EditValue = "0"; popup.ShowDialog(); } } if (columnIndex == 32) { using (MySQLConn sql = new MySQLConn(ConstantLib.BasicConn_Real)) { string sDelivery_Cd = txtDelivery_cd.EditValue.ToString(); sql.Query = "select d_address from domamall.tb_am_product_delivers " + " where d_code = '" + sDelivery_Cd + "' "; DataSet ds = sql.selectQueryDataSet(); string sDelivery_Query = sql.selectQueryForSingleValue() + txto_delivery_num.EditValue; System.Diagnostics.Process.Start(sDelivery_Query); } } }
private void efwGridControl1_Click(object sender, EventArgs e) { DataRow dr = this.efwGridControl1.GetSelectedRow(0); txtcancel.EditValue = ""; txtcontents_id.EditValue = ""; if (dr != null && dr["idx"].ToString() != "0") { using (MySQLConn sql = new MySQLConn(ConstantLib.BasicConn_Real)) { sql.Query = "select ifnull(contents_id,'0') FROM domalife.donut_shooting_list where contents_id = '" + txtidx.EditValue + "' "; DataSet ds = sql.selectQueryDataSet(); txtcontents_id.EditValue = sql.selectQueryForSingleValue().ToString(); } if (txtcontents_id.Text.Length > 5 ^ txtr_login_id.EditValue.ToString() == "AdminLife") { txtcancel.EditValue = "반환 불가"; } else { txtcancel.EditValue = "반환 가능"; } } }
private int MonthDataCnt() { int nCnt = 0; using (MySQLConn sql = new MySQLConn(ConstantLib.BasicConn_Real)) { sql.Query = "SELECT count(*) FROM domamall.tb_ps_charge_month " + "WHERE yymm = '" + dtS_DATE.EditValue3.Substring(0, 6) + "' and LENGTH(acc_date) > 0 and p_type = '02' "; DataSet ds = sql.selectQueryDataSet(); nCnt = Convert.ToInt32(sql.selectQueryForSingleValue()); } return(nCnt); }
private void EfwSimpleButton1_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.txtStory_id.Text)) { return; } using (MySQLConn sql = new MySQLConn(ConstantLib.BasicConn_Real)) { sql.Query = "select contents " + " from domalife.story_list " + " where story_id = " + Convert.ToInt32(txtStory_id.EditValue); DataSet ds = sql.selectQueryDataSet(); txtContents.EditValue = sql.selectQueryForSingleValue(); } }
private void frmDN25_Load(object sender, EventArgs e) { // base.FrmLoadEvent(); DevExpress.Utils.AppearanceObject.DefaultFont = new System.Drawing.Font("맑은고딕", 9); this.IsMenuVw = true; this.IsSearch = true; this.IsNewMode = true; this.IsSave = false; this.IsDelete = false; this.IsCancel = false; this.IsPrint = false; this.IsExcel = false; txtCoidNo.EditValue = UserInfo.instance().LOGIN_ID; dtS_DATE.EditValue = DateTime.Now; dtE_DATE.EditValue = DateTime.Now; using (MySQLConn sql = new MySQLConn(ConstantLib.BasicConn_Real)) { sql.Query = "select code_id FROM domaadmin.tb_common_code where gcode_id = 00048 and code_nm = '" + UserInfo.instance().Name + "' "; DataSet ds = sql.selectQueryDataSet(); txtCoidName.EditValue = sql.selectQueryForSingleValue().ToString(); } gridView1.OptionsView.ShowFooter = true; this.efwGridControl1.BindControlSet( new ColumnControlSet("idx", txtidx) , new ColumnControlSet("r_u_name", txtr_u_name) , new ColumnControlSet("r_u_nickname", txtr_nickname) , new ColumnControlSet("r_login_id", txtr_login_id) , new ColumnControlSet("contents_id", txtcontents_id) ); this.efwGridControl1.Click += efwGridControl1_Click; SetCmb(); }
private void SwitchChk() { if (MonthDataCnt() > 0) { toggleSwitch1.IsOn = true; } else { toggleSwitch1.IsOn = false; } string sAccDate = ""; dtAcc_Date.EditValue = ""; using (MySQLConn sql = new MySQLConn(ConstantLib.BasicConn_Real)) { sql.Query = "SELECT date_format(acc_date, '%Y-%m-%d') FROM domamall.tb_ps_charge_month " + "WHERE yymm = '" + dtS_DATE.EditValue3.Substring(0, 6) + "' and LENGTH(acc_date) > 0 and p_type = '02' group by acc_date "; DataSet ds = sql.selectQueryDataSet(); sAccDate = sql.selectQueryForSingleValue(); } dtAcc_Date.EditValue = sAccDate; }
private void Btn1_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.txt_o_u_id.Text) || string.IsNullOrEmpty(this.txt_o_code.Text)) { return; } using (MySQLConn sql = new MySQLConn(ConstantLib.BasicConn_Real)) { sql.Query = "select count(*) " + " from " + " ( " + " select a.id as src_idx " + " , 221 as contents_type " + " , b.send_id as user_id " + " , c.u_name as user_name " + " , c.u_nickname as user_nickname " + " , c.login_id as login_id " + " , a.o_code as o_code " + " , (SELECT p_id FROM domamall.tb_am_product_order_datas where o_code = a.o_code limit 1) as p_id " + " , b.recv_id as recomender_u_id " + " , d.u_name as recomender_u_name " + " , d.u_nickname as recomender_u_nickname " + " , d.login_id as recomender_login_id " + " , date_format(adddate(a.o_delivery_end_date, interval 72 hour), '%Y-%m-%d 23:59:59') as expiration_date " + " , 'N' as is_write " + " , a.o_date " + " , a.o_deposit_confirm_date " + " , (SELECT IFNULL(group_concat(t.pm_id), 0) FROM domamall.tb_promotion_products t left join domamall.tb_am_product_order_datas tt on t.p_id = tt.p_id where tt.o_code = a.o_code ) as pm_id " + " , (select IF((select count(1) from domamall.tb_cate_product t left join domamall.tb_am_product_order_datas tt on t.p_id = tt.p_id where tt.o_code = a.o_code " + " and (t.c_org_code like 'DC001#DC00115%' or t.c_org_code like 'DC001#DC00120%' or t.c_org_code like 'DC001#DC00121%' or t.c_org_code like 'DC001#DC00122%') ) > 0, 'Y', 'N')) as hangawi_yn " + " , a.reco_possible_donut as reco_donut " + " , (select chef_id from domamall.tb_doma_chef_relations where user_id = b.recv_id and chef_type = 'C' and is_use = 'Y' limit 1) as chef_id " + " from domamall.tb_am_product_orders a " + " left join domalife.member_relations b on a.o_u_id = b.recv_id " + " left join domalife.member_master c on b.send_id = c.u_id " + " inner join domalife.member_master d on a.o_u_id = d.u_id " + " where a.o_type IN ('O','D','F') " + " and a.o_deposit_confirm_date is not null " + " and a.order_mall_type = 'PRIVATE' " + " and a.o_u_id = '" + txt_o_u_id.EditValue + "' " + " and a.o_code = '" + txt_o_code.EditValue + "' " + " order by a.o_date desc " + " ) pp " + "where pp.pm_id not like '%3%' " + " and pp.hangawi_yn = 'N' " + " and pp.reco_donut > 0 " + " and pp.user_id != pp.chef_id "; DataSet ds = sql.selectQueryDataSet(); int ncnt = Convert.ToInt32(sql.selectQueryForSingleValue()); if (ncnt > 0) { lblRes1.Text = "생성!"; } else { lblRes1.Text = "비생성!"; } } }