private void tsbAddType_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "01")) { return; } var frm = new frmChangeOperType(); if (frm.ChangeOperType(null) == DialogResult.Yes) { LoadTv(); } } catch (Exception ex) { MsgForm.ShowFrom(ex); } }
private void tsbUpload_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "14")) { return; } DataRow dr = this.dgvPeo.CurrentRow(); if (dr == null) { return; } var peo = DB.ReflectionHelper.DataRowToModel <bi_t_people_info>(dr); var frm = new frmPeopleUpdate(); frm.people = peo; frm.ShowDialog(); LoadPeo(); }
private void tsbUpload_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "14")) { return; } if (this.tvRegion.SelectedNode == null) { return; } var item = this.tvRegion.SelectedNode.Tag as bi_t_region_info; var frm = new frmRegionUpdate(); item = frm.Change(item); this.tvRegion.SelectedNode.Text = item.region_name; this.tvRegion.SelectedNode.Tag = item; this.tvRegion.Refresh(); }
private void tsbUpload_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "14")) { return; } DataRow dr = this.dgvSup.CurrentRow(); if (dr == null) { return; } var sup = DB.ReflectionHelper.DataRowToModel <bi_t_supcust_info>(dr); var frm = new frmSupcustUpdate(); frm.runType = runType; frm.supcust = sup; frm.ShowDialog(); LoadSup(); }
private void tsbUpload_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "14")) { return; } DataRow dr = this.dgvOper.CurrentRow(); if (dr == null) { return; } var oper = DB.ReflectionHelper.DataRowToModel <sa_t_operator_i>(dr); var frm = new frmOperUpdate(); frm.oper = oper; frm.ShowDialog(); tv_AfterSelect(null, null); }
private void tsbUpload_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "14")) { return; } DataRow dr = this.dgvBranch.CurrentRow(); if (dr == null) { return; } var b = DB.ReflectionHelper.DataRowToModel <bi_t_branch_info>(dr); var frm = new frmBranchUpdate(); frm.branch = b; frm.ShowDialog(); LoadTv(); }
private void tsbEdit_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "14")) { return; } if (this.dataGrid1.CurrentRow() != null) { if (order.IsEdit() == true) { var res = YesNoForm.ShowFrom("数据已修改,是否保存?"); if (res == DialogResult.Yes) { order.Save(); order.ShowOrder(this.dataGrid1.CurrentRow()["sheet_no"].ToString()); ordermerge.ShowForm2(); } else if (res == DialogResult.No) { order.ShowOrder(this.dataGrid1.CurrentRow()["sheet_no"].ToString()); ordermerge.ShowForm2(); } else if (res == DialogResult.Cancel) { } } else { order.ShowOrder(this.dataGrid1.CurrentRow()["sheet_no"].ToString()); ordermerge.ShowForm2(); } } } catch (Exception ex) { MsgForm.ShowFrom(ex); Helper.LogHelper.writeLog("frmIOMaster->tsbEdit_Click()", ex.ToString()); } }
private void tsbDel_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } DataRow dr = this.dgvPeo.CurrentRow(); if (dr == null) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.IPeople bll = new BLL.PeopleBLL(); var peo = DB.ReflectionHelper.DataRowToModel <bi_t_people_info>(dr); bll.Del(peo); LoadPeo(); } }
private void tsbAdd_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "01")) { return; } var frm = new frmSupcustUpdate(); frm.runType = runType; if (tv.SelectedNode != null) { if (tv.SelectedNode.Tag != null) { var region = (Model.bi_t_region_info)tv.SelectedNode.Tag; frm.region_no = region.region_no; } } frm.ShowDialog(); LoadSup(); }
private void tsbDelType_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.IOper bll = new BLL.OperBLL(); bll.DelOperType((sa_t_oper_type)this.tv.SelectedNode.Tag); LoadTv(); } } catch (Exception ex) { MsgForm.ShowFrom(ex); } }
/// <summary> /// 增加一个喜欢的人 /// </summary> /// <param name="loverid">喜欢人的Id</param> /// <returns>0是表示已经喜欢过了,1表示成功</returns> public JsonResult AddMyLover(int loverid) { var id = CheckValid(); var love = LoveDb.One((MyLove m) => m.LoverId == loverid && m.UserId == id); if (love != null)//存在 就删除 { LoveDb.Delete <MyLove>(love.Id); return(Json(0));//已经取消喜欢 } love = new MyLove { LoverId = loverid, UserId = id, ActionTime = DateTime.Now, IsRead = false, }; LoveDb.Add(love); //用户热度 return(Json(1)); }
private void tsbCheck_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "05")) { return; } if (txtsheet_no.Text.Trim() != "") { string sheet_no = txtsheet_no.Text.Trim(); IBLL.ICashOrder bll = new BLL.CashOrder(); bll.Check(sheet_no, Program.oper.oper_id); IOrder ins = this; ins.ShowOrder(sheet_no); } } catch (Exception ex) { MsgForm.ShowFrom(ex); } }
private void tsbCheck_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "05")) { return; } if (sheet_no != null && sheet_no != "") { IBLL.IInOutBLL bll = new BLL.InOutBLL(); bll.CheckCGOrder(sheet_no, Program.oper.oper_id, update_time); IOrder ins = this; ins.ShowOrder(sheet_no); } } catch (Exception ex) { MsgForm.ShowFrom("审核单据异常[" + ex.Message + "]"); Helper.LogHelper.writeLog("frmCGOrder->tsbCheck_Click()", ex.ToString(), sheet_no); } }
private void tsbDel_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } DataRow dr = this.dgvOper.CurrentRow(); if (dr == null) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.IOper bll = new BLL.OperBLL(); var b = DB.ReflectionHelper.DataRowToModel <sa_t_operator_i>(dr); bll.Del(b.oper_id); tv_AfterSelect(null, null); } }
private void tsbAdd_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "01")) { return; } if (order.IsEdit() == true) { var res = YesNoForm.ShowFrom("数据已修改,是否保存?"); if (res == DialogResult.Yes) { order.Save(); order.Add(); ordermerge.ShowForm2(); } else if (res == DialogResult.No) { order.Add(); ordermerge.ShowForm2(); } else if (res == DialogResult.Cancel) { } } else { order.Add(); ordermerge.ShowForm2(); } } catch (Exception ex) { MsgForm.ShowFrom(ex); Helper.LogHelper.writeLog("frmCGInSheetList->tsbAdd_Click()", ex.ToString()); } }
private void tsbEdit_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "14")) { return; } DataRow dr = this.dgvPay.CurrentRow(); if (dr == null) { return; } var item = DB.ReflectionHelper.DataRowToModel <bi_t_sz_type>(dr); if (item != null) { var frm = new frmIncomeEdit(item.pay_way, item); if (frm.ShowDialog() == System.Windows.Forms.DialogResult.Yes) { init_data(); } } }
private void tsbDel_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } if (string.IsNullOrEmpty(this.txtSheet_no.Text)) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.ICheckBLL bll = new BLL.CheckBLL(); bll.DeleteChectInitSheet(new ic_t_check_init() { sheet_no = this.txtSheet_no.Text, update_time = DateTime.Now }); IOrder order = this; order.Add(); } }
private void tsbIniPwd_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "14")) { return; } if (this.dgvOper.CurrentRow() == null) { return; } sa_t_operator_i oper = DB.ReflectionHelper.DataRowToModel <sa_t_operator_i>(dgvOper.CurrentRow()); if (YesNoForm.ShowFrom("确认要重置操作员:" + oper.oper_name + "的密码吗?") == DialogResult.Yes) { IBLL.IOper bll = new BLL.OperBLL(); bll.ResetPWD(oper.oper_id, "1234"); MsgForm.ShowFrom("重置完成,默认密码:1234"); LoadOper(); tv_AfterSelect(null, null); } }
private void LoadItem() { if (!MyLove.PermissionsBalidation(this.Text, "18")) { return; } int cb_index = Conv.ToInt(cb.SelectedValue); string selectedNode = this.tv.SelectedNode == null ? "" : this.tv.SelectedNode.Tag.ToString(); string keyword = this.txtKeyword.Text.Trim(); int stopItem = this.cbShowStopItem.Checked ? 1 : 0; page.PageSize = this.dgvItem.MaxDisplayRowCount(); Thread th = new Thread(() => { Helper.GlobalData.windows.ShowLoad(this); try { Cursor.Current = Cursors.WaitCursor; if (cb_index == 1) { IBLL.IItem bll = new BLL.ItemBLL(); page = bll.GetDataTable( selectedNode, keyword, stopItem, page ); } else if (cb_index == 2) { IBLL.IItem bll = new BLL.ItemBLL(); page = bll.GetDataTable_BySup( selectedNode, keyword, stopItem, page ); } else { page.tb = new DataTable(); } var tb = page.tb; tb.Columns.Add("check"); tb.Columns.Add("row_color", typeof(Color)); foreach (DataRow row in tb.Rows) { if (row["display_flag"].ToString() != "1") { row["row_color"] = Color.Red; } } this.Invoke((MethodInvoker) delegate { this.dgvItem.DataSource = tb; this.lblMaxIndex.Text = page.PageMax.ToString(); this.lblIndex.Text = page.PageIndex.ToString(); }); Cursor.Current = Cursors.Default; } catch (Exception ex) { LogHelper.writeLog("LoadItem", "获取商品出错!"); MsgForm.ShowFrom(ex); } Helper.GlobalData.windows.CloseLoad(this); }); th.Start(); }
private void LoadSup() { if (!MyLove.PermissionsBalidation(this.Text, "18")) { return; } page.PageSize = this.dgvSup.MaxDisplayRowCount(); Thread th = new Thread(() => { Helper.GlobalData.windows.ShowLoad(this); try { Cursor.Current = Cursors.WaitCursor; string cls_no = ""; this.tv.Invoke((MethodInvoker) delegate { if (this.tv.SelectedNode != null) { if (this.tv.SelectedNode.Tag != null) { var item = (Model.bi_t_region_info) this.tv.SelectedNode.Tag; cls_no = item.region_no; } } }); string SelectedNode = ""; string Keyword = ""; int ShowStopSup = 0; this.Invoke((MethodInvoker) delegate { SelectedNode = this.tv.SelectedNode == null ? "" : cls_no; Keyword = this.txtKeyword.Text.Trim(); ShowStopSup = this.cbShowStopSup.Checked ? 1 : 0; }); if (_runType == 0) { IBLL.ISup bll = new BLL.SupBLL(); page = bll.GetDataTable( SelectedNode, Keyword, ShowStopSup, page ); } else if (_runType == 1) { IBLL.ICus bll = new BLL.CusBLL(); page = bll.GetDataTable( SelectedNode, Keyword, ShowStopSup, page ); } Conv.AddColorTable(page.tb, "display_flag"); this.Invoke((MethodInvoker) delegate { this.dgvSup.DataSource = page.tb; this.lblMaxIndex.Text = page.PageMax.ToString(); this.lblIndex.Text = page.PageIndex.ToString(); }); Cursor.Current = Cursors.Default; } catch (Exception ex) { LogHelper.writeLog("LoadSup", "获取商品分类出错!"); MsgForm.ShowFrom(ex); } Helper.GlobalData.windows.CloseLoad(this); }); th.Start(); }