private void toolAdd_Click(object sender, EventArgs e) { FrmBaoFeiEdit frm = new FrmBaoFeiEdit(); frm.ShowDialog(); this.btnSel_Click(null, null); }
private void toolEdit_Click(object sender, EventArgs e) { if (this.gv.GetDataRow(this.gv.FocusedRowHandle) == null) { MessageBox.Show("请选中要修改的案件"); return; } if (this.gv.GetDataRow(this.gv.FocusedRowHandle)["State"].ToString() == "已结算") { MessageBox.Show("鉴定项已归档,无法修改。"); return; } if (this.gv.GetDataRow(this.gv.FocusedRowHandle)["State"].ToString() == "(二次)已结算") { MessageBox.Show("鉴定项已归档,无法修改。"); return; } //if (Program.sOperID.Trim() != "admin") //{ // if (Convert.ToInt32(this.gv.GetDataRow(this.gv.FocusedRowHandle)["isOk"]) == 3) // { // MessageBox.Show("案情已归档,无法修改,如果有需要请联系超级管理员"); // return; // } //} FrmBaoFeiEdit frm = new FrmBaoFeiEdit(this.gv.GetDataRow(this.gv.FocusedRowHandle)["AnQingID"].ToString(), this.gv.GetDataRow(this.gv.FocusedRowHandle)["State"].ToString()); frm.ShowDialog(); this.btnSel_Click(null, null); }
private void toolUpdate_Click(object sender, EventArgs e) { if (this.gv.GetDataRow(this.gv.FocusedRowHandle) == null) { MessageBox.Show("请选中要修改的案件"); return; } if (this.gv.GetDataRow(this.gv.FocusedRowHandle)["State"].ToString() == "进行中") { MessageBox.Show("案情已提交,无法修改。"); return; } if (this.gv.GetDataRow(this.gv.FocusedRowHandle)["State"].ToString() == "已结算") { MessageBox.Show("案情已结算,无法修改。"); return; } FrmBaoFeiEdit frm = new FrmBaoFeiEdit(this.gv.GetDataRow(this.gv.FocusedRowHandle)["AnQingID"].ToString(), this.gv.GetDataRow(this.gv.FocusedRowHandle)["State"].ToString()); frm.ShowDialog(); }
private void FrmMain_Load(object sender, EventArgs e) { try { if (Program.sOperID.Trim() == "admin") { barQx.Enabled = true; brahw.Enabled = true; } else { barQx.Enabled = false; brahw.Enabled = false; } barInfo.Caption = "部门:" + Program.sDeptName + " 登陆人:" + Program.sOperID + " | " + Program.sOperName; try { this.treeView1.Nodes[0].Expand(); this.treeView1.Nodes[3].Expand(); } catch { } Form1 childForm = new Form1(); childForm.MdiParent = this; childForm.Text = "我的桌面"; childForm.Show(); string sError = ""; string sql = $"select AnQingDate,insDate from T_AnQing where DeftName='{ Program.sDeptName}' and OperName='{Program.sOperName}' and State='进行中'"; string sumdate = ""; string _sumdate = ""; DataTable tbDate = SqlHelper.RunQuery(CommandType.Text, sql, null, out sError); if (tbDate.Rows.Count != 0) { int cha = 0; for (int i = 0; i < tbDate.Rows.Count; i++) { cha = CommonInfo.DateDiff(Convert.ToDateTime(tbDate.Rows[i]["insDate"]), DateTime.Now); if (cha >= 20) { sumdate = Convert.ToDateTime(tbDate.Rows[i]["AnQingDate"]).ToString("M月"); if (sumdate != _sumdate) { MessageBox.Show(sumdate + "有正在进行中的检测项以超过20天,请尽快处理!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); _sumdate = sumdate; } } } } if (Program.sRoleID == "003") { FrmBaoFeiEdit bf = new FrmBaoFeiEdit(); bf.ShowDialog(); } //菜单权限读取 string sRoleID = Program.sRoleID; string strSql = "SELECT *,TQx_Menu.TreeNodeName FROM TQx_RoleQx left join TQx_Menu on TQx_Menu.MenuID=TQx_RoleQx.MenuID WHERE IsQx=1 and TQx_Menu.TreeNodeName<>'' and RoleID='" + sRoleID + "' order by TQx_Menu.SortID "; DataTable dtQx = SqlHelper.RunQuery(CommandType.Text, strSql, null, out sError); if (Program.sOperID.Trim() != "admin") { LoadTreeViewQx(treeView1.Nodes[0], dtQx.DefaultView, CommonInfo.CLng(treeView1.Nodes[0].Tag)); LoadTreeViewQx(treeView1.Nodes[1], dtQx.DefaultView, CommonInfo.CLng(treeView1.Nodes[1].Tag)); } else { //treeView1.Nodes.Clear(); } } catch { } try { string sError = ""; string strSql = "select * from T_BanBen where 1=1"; DataTable dtInit = SqlHelper.RunQuery(CommandType.Text, strSql, null, out sError); barButtonItem9.Caption = dtInit.Rows[0]["BanBenDesc"].ToString(); if (dtInit.Rows[0]["BanBenDesc"].ToString().Trim() != Program.sVersion) { MessageBox.Show("您的当前版本不是最新版本,请更新到最新版本[" + dtInit.Rows[0]["BanBenDesc"].ToString().Trim() + "]!", "提示"); this.Close(); } } catch { barButtonItem9.Caption = " "; } }