GG_DPS/BaseInFo/frmOperator.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace GG_DPS
{
public partial class frmOperator : Form
{
private DataSet ds;
private BindingManagerBase myBind;
private bool flgDel;
BindingSource bs = new BindingSource();
ControlDB lnk = new ControlDB();
public frmOperator()
{
InitializeComponent();
}
private void initdgv()
{
string Sql = "Select userId as '用户代号',userName as '用户姓名',password as '用户密码',groupId,case groupId when '1' then '其他操作员' ";
Sql+=" when '2' then '普通操作员' when '3' then '系统管理员' end as '用户组别',accountId,case accountId when '0' then '全权拥有' when '1' ";
Sql+=" then '立体仓库' when '2' then '平面仓库' end as '拥有套帐',sex as '性别',tel as '办公电话',mobile as '手机',";
Sql+=" CreateDate as '建户日期',LastLogTime as '最近登录',note as '备注' from tblOperator";
if (!Login.groupId.Equals(0))
{
Sql = Sql + " Where groupId=" + (Login.groupId);
}
ds = lnk.ExecuteToDataSet(Sql, "tbl");
//this.dv.DataSource = ds.Tables["tbl"];
#region
bs.DataSource = ds.Tables["tbl"];
this.bindingNavigator1.BindingSource = bs;
myBind = this.BindingContext[ds, "tbl"];
dv.DataSource = bs;
Logic.FormatDgv(dv);
//this.textBox2.Text = this.dataGridView1.DisplayedRowCount(true).ToString();
dv.Columns["groupId"].Visible = false;
dv.Columns["accountId"].Visible = false;
dv.Columns["用户密码"].Visible = false;
dv.Columns["性别"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dv.Columns[0].Frozen = true;
dv.Columns[0].ToolTipText = "该列不允许重复录入!";
#endregion
}
后面还有 168 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
