public SubFormUser(Token tk) { InitializeComponent(); TheToken = tk; try { string strSel = "SELECT * FROM rhdbs.user_info"; if (TheToken.DataConn.State == ConnectionState.Closed) { TheToken.DataConn.Open(); } dataAdapter = new MySqlDataAdapter(strSel, TheToken.DataConn); } catch { MessageBox.Show("初始化失败!"); } InitData(); // 菜单权限 //if (MenuSet.userSel == '1') btnSel.Enabled = true; //if (MenuSet.userAdd == '1') btnAdd.Enabled = true; //if (MenuSet.userDel == '1') btnDel.Enabled = true; //if (MenuSet.userUpt == '1') btnUpt.Enabled = true; }
public SubFormCust(Token tk) { InitializeComponent(); TheToken = tk; SqlConn = new MySqlConnection(TheToken.DataConnStr); SqlConn.Open(); // 客户详细资料 string sql1 = string.Format("SELECT * FROM cust_info"); CustDaDetails = new MySqlDataAdapter(sql1, SqlConn); // 客户照片 string sql2 = string.Format("SELECT * FROM cust_photo"); CustDaPhotos = new MySqlDataAdapter(sql2, SqlConn); }
public SubFormRemind(Token tk) { InitializeComponent(); TheToken = tk; try { string strSql = "SELECT cust_id,cust_name,sex,birthday,level,remind_flag,remind_time,xczx,dhzx,tbtx,cjjl FROM rhdbs.cust_info"; if (TheToken.DataConn.State == ConnectionState.Closed) { TheToken.DataConn.Open(); } dataAdapter = new MySqlDataAdapter(strSql, TheToken.DataConn); } catch { MessageBox.Show("初始化失败!"); } // 菜单权限 //if (MenuSet.remindSel == '1') btnSel.Enabled = true; //else // btnSel.Enabled = false; //if (MenuSet.remindAdd == '1') btnAdd.Enabled = true; //else // btnAdd.Enabled = false; //if (MenuSet.remindDel == '1') btnDel.Enabled = true; //else // btnDel.Enabled = false; //if (MenuSet.remindUpt == '1') btnUpt.Enabled = true; //else // btnUpt.Enabled = false; }
public SubFormPwd(Token tk) { InitializeComponent(); TheToken = tk; }