private void lbl_Count_In_Click(object sender, EventArgs e) { if (this._IsDoDBForeGround) { this.tmrMain.Enabled = false; Label label = (Label)sender; string s = label.Text.Trim(); if ((s != "") && (int.Parse(s) != 0)) { string name = label.Name; string funName = ""; string str5 = name; if (str5 != null) { if (!(str5 == "lbl_Count_In")) { if (str5 == "lbl_Count_Out") { funName = "DataImpBillOut"; } else if (str5 == "lbl_Count_Remove") { funName = "DataImpBillRemove"; } else if (str5 == "lbl_Count_Check") { funName = "DataImpBillCheck"; } } else { funName = "DataImpBillIn"; } } string path = base.AppInformation.AppPath + @"\DataInFromMid.dll"; if (File.Exists(path)) { bool bIsOK = false; object[] param = new object[] { base.AppInformation, base.UserInformation }; MyCallSafetyDll.DoCallMyDll(path, "DataInFromMid.DataInFromMid", funName, param, out bIsOK); } else { MessageBox.Show(path + " 不存在!"); } this.tmrMain.Enabled = true; } } }
private void DoMenuItemClick(object sender, EventArgs e) { bool bIsOK = false; bool flag2 = true; ToolStripMenuItem item = (ToolStripMenuItem)sender; if ((item != null) && (item.Tag != null)) { string str4; string[] strArray = item.Tag.ToString().Trim().Split(new char[] { '^' }); string str2 = "select * from TPB_Rights where cRId='" + item.Name.ToString().Trim() + "'"; DataSet set = null; SeDBClient client = new SeDBClient(DBSocketServerType.dbsstDotNet); DBSQLCommandInfo cmdInfo = new DBSQLCommandInfo { FromSysType = "DotNet", PageIndex = 0, PageSize = 0, SqlText = str2.ToString(), SqlType = SqlCommandType.sctSql, MyEncoding = Encoding.UTF8, DataTableName = "TPB_Rights" }; string sErr = ""; set = client.GetDataSet(this.ainfo.SvrSocket, cmdInfo, false, out sErr); DataTable table = set.Tables["TPB_Rights"]; if ((table != null) && (table.Rows.Count > 0)) { flag2 = table.Rows[0]["cRType"].ToString() != "2"; } set.Clear(); if (flag2) { if ((strArray != null) && (strArray.Length > 2)) { str4 = this.ainfo.AppPath + @"\" + strArray[0]; if (File.Exists(str4)) { object[] param = new object[] { this.ainfo, this.userInfo, item.Name }; MyCallSafetyDll.DoCallMyDll(str4, strArray[1], strArray[2], param, out bIsOK); } else { MessageBox.Show(this.ainfo.AppPath + @"\" + strArray[0] + " 不存在!"); } } } else if ((strArray != null) && (strArray.Length == 1)) { str4 = this.ainfo.AppPath + @"\" + strArray[0]; if (File.Exists(str4)) { if (!MyExeFile.CheckExeIsRunning(str4)) { MyExeFile.CallExe(str4, ProcessWindowStyle.Normal, new string[] { this.userInfo.UserId.ToString() }); } } else { MessageBox.Show(this.ainfo.AppPath + @"\" + strArray[0] + " 不存在!"); } } } }