private void btnPeDataDownLoad_Click(object sender, EventArgs e) { string where = string.Format("user_no like '%{0}%'", txtType.Text.Trim()); List <Model.TableModel.Sys_user> list = DbEngine.QueryList <Model.TableModel.Sys_user>(where); if (list.Count > 0) { Ctrl.DbOperateCtrl dbOperateCtrl = new Ctrl.DbOperateCtrl(EqmNo); object state = false; bool flag = dbOperateCtrl.PeDataDownLoad(state); if (flag) { frmMsgBox msg = new frmMsgBox("下载成功!"); msg.ShowDialog(); } else { frmMsgBox msg = new frmMsgBox("下载失败!"); msg.ShowDialog(); } this.Close(); } else { frmMsgBox msg = new frmMsgBox("用户校验失败无法上传!"); msg.Show(); } }
private static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); System.IO.Directory.SetCurrentDirectory(Application.StartupPath); try { //if (args != null && args.Length > 0) //{ string server = "127.0.0.1"; string userNo = "Server"; string userTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); AnalyzeArgs(args, ref server, ref userNo, ref userTime); //Application.Run(new frmMain(userNo, server, userTime)); Application.Run(new frmBaseMaster()); // } } catch (Exception ex) { frmMsgBox frm = new frmMsgBox("登录失败!" + ex.ToString()); frm.ShowDialog(); } }