Exemple #1
0
        public ActionResult SnNumber(string id, string topic = null, string param = null,
                                     string displayLanguages = null, string isPdf = "0", string isWaiting = "0")
        {
            var table = DbDapper.RunDataTableSql(@"SELECT TOP(1) b.WfdWorkflowNodeId,c.AppPageId,b.TaskId,a.AreaCode FROM dbo.InstTask a
                INNER JOIN dbo.InstProc b ON a.Id = b.TaskId
                INNER JOIN dbo.WfdWorkflowNode c ON b.WfdWorkflowNodeId = c.Id
                WHERE Sn = @SnNumber AND b.NodeType IN (0,1)
                ORDER BY b.ProcTime DESC", new { SnNumber = id });

            if (table.Rows.Count > 0)
            {
                return(Redirect("/SysPages/AppPage/?nodeId={0}&pageId={1}&taskId={2}&areaCode={3}&displayLanguages={4}&param={5}&isPdf={6}&topoc={7}"
                                .Fill(table.Rows[0]["WfdWorkflowNodeId"].ToString(),
                                      table.Rows[0]["AppPageId"].ToString(),
                                      table.Rows[0]["TaskId"].ToString(),
                                      table.Rows[0]["AreaCode"].ToString(),
                                      displayLanguages,
                                      param,
                                      isPdf,
                                      topic,
                                      isWaiting)));
            }

            return(RedirectToAction("ErrorMessage", "Account", new { error = "该单号为历史单号,请到老系统中查询" }));
        }
        /// <summary>
        /// 链接字符串测试
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_connect_Click(object sender, EventArgs e)
        {
            btn_connect.Enabled = false;
            ReleaseBuildHelper rbh = new ReleaseBuildHelper();

            var sb = new StringBuilder();

            // 当前数据
            try
            {
                DbDapper.RunDataTableSql("select 1");
                sb.AppendLine("1.当前数据库连接成功!");
            }
            catch
            {
                sb.AppendLine("1.当前数据库连接失败!");
            }

            //目标数据
            try
            {
                rbh.DbTargetQuery("select 1");
                sb.AppendLine("2.目标数据库连接成功!");
            }
            catch
            {
                sb.AppendLine("2.目标数据库连接失败!");
            }
            btn_connect.Enabled = true;
            MessageBox.Show(sb.ToString());
        }
Exemple #3
0
 public void Analyze(bool needSql = false)
 {
     Table = DbDapper.RunDataTableSql(Query);
     //获取表名
     InitializeTableName();
     //初始化列
     InitializeColumns();
     //初始化From后面的语句
     InitializeFromString();
     //获取查询语句
     BuildQuery();
     //获取同步脚本
     if (needSql)
     {
         GetSyncScript();
     }
 }
Exemple #4
0
        public ActionResult MplReport(string id, string param)
        {
            var table = DbDapper.RunDataTableSql(@"
                SELECT TOP ( 1 )
                        b.WfdWorkflowNodeId ,
                        c.AppPageId ,
                        b.TaskId ,
                        a.AreaCode
                FROM    dbo.InstTask a
                INNER JOIN dbo.InstProc b ON a.Id = b.TaskId
                INNER JOIN dbo.WfdWorkflowNode c ON b.WfdWorkflowNodeId = c.Id
                WHERE   Sn = @SnNumber
                        AND b.NodeType IN ( 0, 1 )
                ORDER BY b.ProcTime DESC", new { SnNumber = id });

            return(Redirect(table.Rows.Count > 0 ? "/SysPages/AppPage/?nodeId={0}&pageId={1}&taskId={2}&areaCode={3}&param={4}".Fill(table.Rows[0]["WfdWorkflowNodeId"].ToString(), table.Rows[0]["AppPageId"].ToString(), table.Rows[0]["TaskId"].ToString(), table.Rows[0]["AreaCode"].ToString(), param) : "/SysPages/AppPage/?nodeId={0}&pageId={1}&taskId={2}&areaCode={3}".Fill("", "", "", "")));
        }
Exemple #5
0
        public ServiceConfig(string code)
        {
            DataTable dt = DbDapper.RunDataTableSql("select * from base_if_config where code='" + code + "'");

            if (dt.Rows.Count <= 0)
            {
                return;
            }
            DataRow dr = dt.Rows[0];

            Url         = dr["if_url"].ToString();
            UserAccount = dr["if_user"].ToString();
            Password    = dr["if_password"].ToString();
            ServiceName = dr["req_name"].ToString();
            RequestName = dr["param_name"].ToString();
            MethodName  = dr["method_name"].ToString();
            RespName    = dr["resp_name"].ToString();
            SAPIfCode   = dr["sap_ifcode"].ToString();
            SAPSender   = dr["sap_sender"].ToString();
            SAPReceiver = dr["sap_receiver"].ToString();
        }
Exemple #6
0
 public virtual PagedDatatable GetDataTable(string sql, IPaging input, object param = null)
 {
     return(DbDapper.RunDataTableSql(sql, input, param, DbConnection, DbTransaction));
 }
Exemple #7
0
 public virtual DataTable GetDataTable(string sql, object param = null)
 {
     return(DbDapper.RunDataTableSql(sql, param, DbConnection, DbTransaction));
 }