Beispiel #1
0
        public override short processTask(
            string task, string server, string database, out string returnMsg, out string returnParams)
        {
            var helper = new Helper(task, server, database, GetType().FullName);
            var result = (short)UnitTasks.RUN_SUCESS;

            returnMsg    = "操作成功!";
            returnParams = "";
            var algId = helper.getTaskAttribute("algID");

            if (string.IsNullOrEmpty(algId))
            {
                throw new InvalidOperationException("algID 为空!");
            }
            if (helper.IsInteractive)//手工调用
            {
                try
                {
                    using (var form = new Forms.mOrdersForm(helper.Connection, Convert.ToInt32(algId)))
                    {
                        form.WindowState = FormWindowState.Maximized;
                        form.ShowDialog();
                    }
                }
                catch (Exception err)
                {
                    returnMsg = "手工修改单操作失败!" + err.Message;
                    throw new InvalidOperationException("手工修改单操作失败!" + err.Message);
                }
            }
            //return 0;
            return(result);
        }
Beispiel #2
0
        public void InvokeCanTestMOrdForm()
        {
            //SqlConnection sqlConn = new SqlConnection("Data Source=10.10.200.4;Initial Catalog=inSight;User ID=Leo;Password=2020;Connect Timeout=15;");
            SqlConnection sqlConn = new SqlConnection("Data Source=10.10.200.36;Initial Catalog=inSight_B;User ID=Leo;Password=Leo;Connect Timeout=15;");

            sqlConn.Open();
            var form = new Forms.mOrdersForm(sqlConn, 1923491);//4619068 //40270745//2032//1923491 //CAD实木2154267 5493258

            form.WindowState = FormWindowState.Maximized;
            // 设置全屏
            form.ShowDialog();
        }