Exemplo n.º 1
0
    private void Show(string cid)
    {
        Hashtable hashtable = (Hashtable)HttpContext.Current.Application["config_fenye"];
        int       num       = Convert.ToInt32(hashtable["fenye_commom"]);
        int       num2      = 0;

        try
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["page"]))
            {
                num2 = Convert.ToInt32(base.Request.QueryString["page"]);
            }
        }
        catch
        {
        }
        if (num2 == 0)
        {
            num2 = 1;
        }
        int    num3 = num * (num2 - 1);
        string text = string.Concat(new string[]
        {
            " cid=",
            cid,
            " and CreatorID=",
            this.Uid,
            " "
        });
        int num4 = Convert.ToInt32(MsSqlOperate.ExecuteScalar(CommandType.Text, "select count(*) from CRM_Contact where " + text, null));

        this.num.InnerHtml = "当前查询条件总计 - <span style='color:#ff0000; font-weight:bold;'>" + num4 + "</span> 条 记录数据";
        string sql = string.Concat(new object[]
        {
            "select top ",
            num,
            " * from CRM_Contact where ",
            text,
            " order by id desc"
        });

        if (num2 != 1)
        {
            sql = string.Concat(new object[]
            {
                "SELECT TOP ",
                num,
                " * FROM CRM_Contact WHERE id<(SELECT MIN(id) FROM (SELECT TOP ",
                num3.ToString(),
                " id FROM CRM_Contact WHERE (",
                text,
                " ) ORDER BY id DESC) T1) AND (",
                text,
                " ) ORDER BY id DESC"
            });
        }
        this.Bind(sql, this.rpt);
        this.Page1.sty("meneame", num2, this.GetCountPage(num4, num), "?cid=" + cid + "&page=");
    }
Exemplo n.º 2
0
    private IList GetOrdersUser()
    {
        object value             = MsSqlOperate.ExecuteScalar(CommandType.Text, "select min(id) from sys_dep where ParentID=0", new SqlParameter[0]);
        List <Sys_UserInfo> list = new List <Sys_UserInfo>();

        this.GetTreeItems(Convert.ToInt32(value), list);
        return(list);
    }
Exemplo n.º 3
0
    private string GetVoteItemCount(string name, int vid)
    {
        string cmdText = "select count(*) from VoteDetail where VoteID=" + vid + " and ItemName=@ItemName";

        return(string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, cmdText, new SqlParameter[]
        {
            new SqlParameter("@ItemName", name ?? "")
        })));
    }
Exemplo n.º 4
0
        private static void UpdateDeps()
        {
            int a_ = 7;

            if (true)
            {
            }
            //HttpContext.Current.Application[Module.a("쒰잲솴", a_)] = string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, Admin_Help.UpdateFlows(), new SqlParameter[0]));
            HttpContext.Current.Application["uut"] = string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, Admin_Help.UpdateFlows(), new SqlParameter[0]));
        }
Exemplo n.º 5
0
        //public static void UpdateIMUser(Sys_UserInfo ui)
        //{
        //    try
        //    {
        //        string cmdText = "select [Key] from WM_Users where Name='" + ui.UserName + "'";
        //        string text = string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, cmdText, new SqlParameter[0]));
        //        if (Utils.IsNumber(text))
        //        {
        //            string str = string.Concat(new string[]
        //    {
        //        "update WM_Users set Nickname='",
        //        ui.RealName,
        //        "',Password='******',EMail='",
        //        ui.Email,
        //        "',Phone='",
        //        ui.Phone,
        //        "',TelPhone='",
        //        ui.Tel,
        //        "' where Name='",
        //        ui.UserName,
        //        "';"
        //    });
        //            string text2 = string.Format("DELETE FROM WM_UDD WHERE uid={1} ; INSERT INTO WM_UDD(did,uid,tid)VALUES({0},{1},0) ", ui.DepID, text);
        //            text2 = str + text2;
        //            MsSqlOperate.ExecuteNonQuery(CommandType.Text, text2, new SqlParameter[0]);
        //            AccountImpl.Instance._RefreshUserInfo(Convert.ToInt64(text));
        //        }
        //        else
        //        {
        //            AccountImpl.Instance.AddUser(ui.UserName, ui.RealName, ui.PassWord, ui.Email, ui.Phone, ui.Tel);
        //            string cmdText2 = "select [Key] from WM_Users where Name='" + ui.UserName + "'";
        //            string text3 = string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, cmdText2, new SqlParameter[0]));
        //            if (Utils.IsNumber(text3))
        //            {
        //                string text2 = string.Format("DELETE FROM WM_UDD WHERE uid={1} ; INSERT INTO WM_UDD(did,uid,tid)VALUES({0},{1},0) ", ui.DepID, text3);
        //                MsSqlOperate.ExecuteNonQuery(CommandType.Text, text2, new SqlParameter[0]);
        //            }
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}

        public static void UpdateIMUser(Sys_UserInfo ui)
        {
            try
            {
                string cmdText = "select ID from Users where Name='" + ui.UserName + "'";
                string text    = string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, cmdText, new SqlParameter[0]));
                if (Utils.IsNumber(text))
                {
                    string str = string.Concat(new string[]
                    {
                        "update Users set Nickname='",
                        ui.RealName,
                        "',Password='******',EMail='",
                        ui.Email,
                        "',Tel='",
                        ui.Phone,
                        "',Mobile='",
                        ui.Tel,
                        "' where Name='",
                        ui.UserName,
                        "';"
                    });

                    //MsSqlOperate.ExecuteNonQuery(CommandType.Text, str, new SqlParameter[0]);
                }
                else
                {
                    int id = AccountImpl.Instance.CreateUser(
                        ui.UserName.ToString(),
                        ui.RealName.ToString(),
                        ui.PassWord.ToString(),
                        ui.Email.ToString(),
                        -1, 0
                        );
                    AccountInfo newUser = AccountImpl.Instance.GetUserInfo(id);



                    //AccountImpl.Instance.AddUser(ui.UserName, ui.RealName, ui.PassWord, ui.Email, ui.Phone, ui.Tel);
                    string cmdText2 = "select ID from Users where Name='" + ui.UserName + "'";
                    string text3    = string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, cmdText2, new SqlParameter[0]));
                    if (Utils.IsNumber(text3))
                    {
                        string text2 = string.Format("DELETE FROM WM_UDD WHERE uid={1} ; INSERT INTO WM_UDD(did,uid,tid)VALUES({0},{1},0) ", ui.DepID, text3);
                        //MsSqlOperate.ExecuteNonQuery(CommandType.Text, text2, new SqlParameter[0]);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 6
0
    private void Show()
    {
        int num  = 50;
        int num2 = 0;

        try
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["page"]))
            {
                num2 = Convert.ToInt32(base.Request.QueryString["page"]);
            }
        }
        catch
        {
        }
        if (num2 == 0)
        {
            num2 = 1;
        }
        string text = " UserName='******'";
        int    num3 = num * (num2 - 1);
        int    num4 = Convert.ToInt32(MsSqlOperate.ExecuteScalar(CommandType.Text, "select count(*) from Sys_UserLogin where " + text, null));

        this.num.InnerHtml = "当前查询条件总计 - <span style='color:#ff0000; font-weight:bold;'>" + num4 + "</span> 条 记录数据";
        string sql = string.Concat(new object[]
        {
            "select top ",
            num,
            " * from Sys_UserLogin where ",
            text,
            " order by id desc"
        });

        if (num2 != 1)
        {
            sql = string.Concat(new object[]
            {
                "SELECT TOP ",
                num,
                " * FROM Sys_UserLogin WHERE id<(SELECT MIN(id) FROM (SELECT TOP ",
                num3.ToString(),
                " id FROM Sys_UserLogin WHERE (",
                text,
                " ) ORDER BY id DESC) T1) AND (",
                text,
                " ) ORDER BY id DESC"
            });
        }
        this.Bind(sql, this.rpt);
        this.Page1.sty("meneame", num2, this.GetCountPage(num4, num), "?page=");
    }
Exemplo n.º 7
0
    //protected HtmlForm form1;
    protected void Page_Load(object sender, EventArgs e)
    {
        string cmdText  = "select count(id) from Docs_Doc where CreatorID=" + this.Uid;
        string cmdText2 = string.Concat(new string[]
        {
            "select count(id) from Docs_Doc where CreatorID<>",
            this.Uid,
            " and IsShare=1 and ShareUsers like '%#",
            this.Uid,
            "#%' "
        });

        this.num1 = string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, cmdText, null));
        this.num2 = string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, cmdText2, null));
    }
Exemplo n.º 8
0
 private string GetAllNums()
 {
     return(string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, "select count(id) from News_Article", new SqlParameter[0])));
 }
Exemplo n.º 9
0
    private void Show(string fid)
    {
        Hashtable hashtable = (Hashtable)HttpContext.Current.Application["config_fenye"];
        int       num       = Convert.ToInt32(hashtable["fenye_mail"]);
        int       num2      = 0;

        try
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["page"]))
            {
                num2 = Convert.ToInt32(base.Request.QueryString["page"]);
            }
        }
        catch
        {
        }
        if (num2 == 0)
        {
            num2 = 1;
        }
        int    num3  = num * (num2 - 1);
        string text  = "FolderType=" + fid + " and ReceiverID=" + this.Uid;
        string text2 = base.Request.QueryString["keywords"];

        if (!string.IsNullOrEmpty(text2) && Utils.CheckSql(text2))
        {
            string text3 = text;
            text = string.Concat(new string[]
            {
                text3,
                " and (SenderRealName like '%",
                text2,
                "%' or SenderDepName like '%",
                text2,
                "%' or Subject like '%",
                text2,
                "%') "
            });
        }
        int num4 = Convert.ToInt32(MsSqlOperate.ExecuteScalar(CommandType.Text, "select count(*) from Mails where " + text, null));

        this.num.InnerHtml = "当前查询条件总计 - <span style='color:#ff0000; font-weight:bold;'>" + num4 + "</span> 条 记录数据";
        string sql = string.Concat(new object[]
        {
            "select top ",
            num,
            " * from Mails where ",
            text,
            " order by id desc"
        });

        if (num2 != 1)
        {
            sql = string.Concat(new object[]
            {
                "SELECT TOP ",
                num,
                " * FROM Mails WHERE id<(SELECT MIN(id) FROM (SELECT TOP ",
                num3.ToString(),
                " id FROM Mails WHERE (",
                text,
                " ) ORDER BY id DESC) T1) AND (",
                text,
                " ) ORDER BY id DESC"
            });
        }
        this.Bind(sql, this.rpt);
        if (string.IsNullOrEmpty(base.Request.QueryString["keywords"]))
        {
            this.Page2.sty("meneame", num2, this.GetCountPage(num4, num), "?fid=" + base.Request.QueryString["fid"] + "&page=");
        }
        if (!string.IsNullOrEmpty(base.Request.QueryString["keywords"]))
        {
            this.Page2.sty("meneame", num2, this.GetCountPage(num4, num), string.Concat(new string[]
            {
                "?fid=",
                base.Request.QueryString["fid"],
                "&keywords=",
                text2,
                "&page="
            }));
        }
    }
Exemplo n.º 10
0
    private void Show()
    {
        Hashtable hashtable = (Hashtable)HttpContext.Current.Application["config_fenye"];
        int       num       = Convert.ToInt32(hashtable["fenye_commom"]);
        int       num2      = 0;

        try
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["page"]))
            {
                num2 = Convert.ToInt32(base.Request.QueryString["page"]);
            }
        }
        catch
        {
        }
        if (num2 == 0)
        {
            num2 = 1;
        }
        int    num3  = num * (num2 - 1);
        string text  = "UserID=" + this.Uid;
        string text2 = base.Request.QueryString["keywords"];

        if (!string.IsNullOrEmpty(text2) && Utils.CheckSql(text2))
        {
            text = text + " and (Subject like '%" + text2 + "%' ) ";
        }
        int num4 = Convert.ToInt32(MsSqlOperate.ExecuteScalar(CommandType.Text, "select count(*) from NoteBook where " + text, null));

        this.num.InnerHtml = "当前查询条件总计 - <span style='color:#ff0000; font-weight:bold;'>" + num4 + "</span> 条 记录数据";
        string sql = string.Concat(new object[]
        {
            "select top ",
            num,
            " * from NoteBook where ",
            text,
            " order by id desc"
        });

        if (num2 != 1)
        {
            sql = string.Concat(new object[]
            {
                "SELECT TOP ",
                num,
                " * FROM NoteBook WHERE id<(SELECT MIN(id) FROM (SELECT TOP ",
                num3.ToString(),
                " id FROM NoteBook WHERE (",
                text,
                " ) ORDER BY id DESC) T1) AND (",
                text,
                " ) ORDER BY id DESC"
            });
        }
        this.Bind(sql, this.rpt);
        if (text == "UserID=" + this.Uid)
        {
            this.Page1.sty("meneame", num2, this.GetCountPage(num4, num), "?page=");
        }
        else
        {
            this.Page1.sty("meneame", num2, this.GetCountPage(num4, num), "?keywords=" + text2 + "&page=");
        }
    }
Exemplo n.º 11
0
    private void Show()
    {
        SqlParameter sqlParameter = new SqlParameter();

        sqlParameter.ParameterName = "@uid";
        sqlParameter.Size          = 50;
        sqlParameter.Value         = this.Uid;
        SqlParameter sqlParameter2 = new SqlParameter();

        sqlParameter2.ParameterName = "@depid";
        sqlParameter2.Size          = 50;
        sqlParameter2.Value         = this.DepID;
        SqlParameter sqlParameter3 = new SqlParameter();

        sqlParameter3.Direction     = ParameterDirection.Output;
        sqlParameter3.ParameterName = "@pt1";
        sqlParameter3.Size          = 4;
        SqlParameter sqlParameter4 = new SqlParameter();

        sqlParameter4.Direction     = ParameterDirection.Output;
        sqlParameter4.ParameterName = "@pt2";
        sqlParameter4.Size          = 4;
        SqlParameter sqlParameter5 = new SqlParameter();

        sqlParameter5.Direction     = ParameterDirection.Output;
        sqlParameter5.ParameterName = "@pt3";
        sqlParameter5.Size          = 4;
        SqlParameter sqlParameter6 = new SqlParameter();

        sqlParameter6.Direction     = ParameterDirection.Output;
        sqlParameter6.ParameterName = "@pt4";
        sqlParameter6.Size          = 4;
        SqlParameter sqlParameter7 = new SqlParameter();

        sqlParameter7.Direction     = ParameterDirection.Output;
        sqlParameter7.ParameterName = "@pt5";
        sqlParameter7.Size          = 4;
        SqlParameter sqlParameter8 = new SqlParameter();

        sqlParameter8.Direction     = ParameterDirection.Output;
        sqlParameter8.ParameterName = "@pt6";
        sqlParameter8.Size          = 4;
        SqlParameter sqlParameter9 = new SqlParameter();

        sqlParameter9.Direction     = ParameterDirection.Output;
        sqlParameter9.ParameterName = "@pt7";
        sqlParameter9.Size          = 4;
        SqlParameter sqlParameter10 = new SqlParameter();

        sqlParameter10.Direction     = ParameterDirection.Output;
        sqlParameter10.ParameterName = "@pt8";
        sqlParameter10.Size          = 4;
        SqlParameter sqlParameter11 = new SqlParameter();

        sqlParameter11.Direction     = ParameterDirection.Output;
        sqlParameter11.ParameterName = "@pt10";
        sqlParameter11.Size          = 4;
        SqlParameter sqlParameter12 = new SqlParameter();

        sqlParameter12.Direction     = ParameterDirection.Output;
        sqlParameter12.ParameterName = "@pt11";
        sqlParameter12.Size          = 4;
        SqlParameter sqlParameter13 = new SqlParameter();

        sqlParameter13.Direction     = ParameterDirection.Output;
        sqlParameter13.ParameterName = "@pt12";
        sqlParameter13.Size          = 4;
        SqlParameter sqlParameter14 = new SqlParameter();

        sqlParameter14.Direction     = ParameterDirection.Output;
        sqlParameter14.ParameterName = "@pt13";
        sqlParameter14.Size          = 4;
        SqlParameter[] cmdParms = new SqlParameter[]
        {
            sqlParameter3,
            sqlParameter4,
            sqlParameter5,
            sqlParameter6,
            sqlParameter7,
            sqlParameter8,
            sqlParameter9,
            sqlParameter10,
            sqlParameter11,
            sqlParameter12,
            sqlParameter13,
            sqlParameter14,
            sqlParameter,
            sqlParameter2
        };
        using (MsSqlOperate.ExecuteDataset(CommandType.StoredProcedure, "Global_GetDesktopData", cmdParms))
        {
            this.news_num     = string.Concat(sqlParameter3.Value);
            this.mails_num1   = string.Concat(sqlParameter4.Value);
            this.mails_num2   = string.Concat(sqlParameter5.Value);
            this.flows_num1   = string.Concat(sqlParameter6.Value);
            this.flows_num2   = string.Concat(sqlParameter7.Value);
            this.calendar_num = string.Concat(sqlParameter8.Value);
            this.note_num     = string.Concat(sqlParameter9.Value);
            this.mydoc_num    = string.Concat(sqlParameter10.Value);
            this.shared_num   = string.Concat(sqlParameter11.Value);
            this.shared_num2  = string.Concat(sqlParameter12.Value);
            this.exe_num      = string.Concat(sqlParameter13.Value);
            this.man_num      = string.Concat(sqlParameter14.Value);
            this.work_num1    = string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, "select count(id) from worklog where CreatorID=" + this.Uid, new SqlParameter[0]));
            this.work_num2    = string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, string.Concat(new string[]
            {
                "select count(id) from worklog where  CreatorID<>",
                this.Uid,
                " and ShareUsers like '%#",
                this.Uid,
                "#%' "
            }), new SqlParameter[0]));
        }
    }
Exemplo n.º 12
0
    private void Show()
    {
        int num  = 30;
        int num2 = 0;

        try
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["page"]))
            {
                num2 = Convert.ToInt32(base.Request.QueryString["page"]);
            }
        }
        catch
        {
        }
        if (num2 == 0)
        {
            num2 = 1;
        }
        int    num3  = num * (num2 - 1);
        string text  = base.Request.QueryString["keywords"];
        string text2 = base.Request.QueryString["action"];
        string text3 = "";

        if (text2 == "mydoc")
        {
            text3 = " CreatorID=" + this.Uid;
            if (!string.IsNullOrEmpty(text))
            {
                string text4 = text3;
                text3 = string.Concat(new string[]
                {
                    text4,
                    " and (LogTitle like '%",
                    text,
                    "%' or CreatorRealName like '%",
                    text,
                    "%') "
                });
            }
        }
        if (text2 == "shared")
        {
            text3 = string.Concat(new string[]
            {
                " (CreatorID<>",
                this.Uid,
                " and ShareUsers like '%#",
                this.Uid,
                "#%') "
            });
            if (!string.IsNullOrEmpty(text))
            {
                string text4 = text3;
                text3 = string.Concat(new string[]
                {
                    text4,
                    " and (LogTitle like '%",
                    text,
                    "%' or CreatorRealName like '%",
                    text,
                    "%') "
                });
            }
        }
        int num4 = Convert.ToInt32(MsSqlOperate.ExecuteScalar(CommandType.Text, "select count(id) from WorkLog where " + text3, null));

        this.num.InnerHtml = "当前总计 - <span style='color:#ff0000; font-weight:bold;'>" + num4 + "</span> 条 记录数据";
        string sql = string.Concat(new object[]
        {
            "select top ",
            num,
            " * from WorkLog where ",
            text3,
            " order by id desc"
        });

        if (num2 != 1)
        {
            sql = string.Concat(new object[]
            {
                "SELECT TOP ",
                num,
                " * FROM WorkLog WHERE id<(SELECT MIN(id) FROM (SELECT TOP ",
                num3.ToString(),
                " id FROM WorkLog WHERE (",
                text3,
                " ) ORDER BY id DESC) T1) AND (",
                text3,
                " ) ORDER BY id DESC"
            });
        }
        this.Bind(sql, this.rpt);
        if (string.IsNullOrEmpty(text))
        {
            this.Page1.sty("meneame", num2, this.GetCountPage(num4, num), "?action=" + text2 + "&page=");
        }
        else
        {
            this.Page1.sty("meneame", num2, this.GetCountPage(num4, num), string.Concat(new string[]
            {
                "?action=",
                text2,
                "&keywords=",
                text,
                "&page="
            }));
        }
    }
Exemplo n.º 13
0
    private void Show()
    {
        SqlParameter sqlParameter = new SqlParameter();

        sqlParameter.ParameterName = "@uid";
        sqlParameter.Size          = 50;
        sqlParameter.Value         = this.Uid;
        SqlParameter sqlParameter2 = new SqlParameter();

        sqlParameter2.ParameterName = "@depid";
        sqlParameter2.Size          = 50;
        sqlParameter2.Value         = this.DepID;
        SqlParameter sqlParameter3 = new SqlParameter();

        sqlParameter3.Direction     = ParameterDirection.Output;
        sqlParameter3.ParameterName = "@pt1";
        sqlParameter3.Size          = 4;
        SqlParameter sqlParameter4 = new SqlParameter();

        sqlParameter4.Direction     = ParameterDirection.Output;
        sqlParameter4.ParameterName = "@pt2";
        sqlParameter4.Size          = 4;
        SqlParameter sqlParameter5 = new SqlParameter();

        sqlParameter5.Direction     = ParameterDirection.Output;
        sqlParameter5.ParameterName = "@pt3";
        sqlParameter5.Size          = 4;
        SqlParameter sqlParameter6 = new SqlParameter();

        sqlParameter6.Direction     = ParameterDirection.Output;
        sqlParameter6.ParameterName = "@pt4";
        sqlParameter6.Size          = 4;
        SqlParameter sqlParameter7 = new SqlParameter();

        sqlParameter7.Direction     = ParameterDirection.Output;
        sqlParameter7.ParameterName = "@pt5";
        sqlParameter7.Size          = 4;
        SqlParameter sqlParameter8 = new SqlParameter();

        sqlParameter8.Direction     = ParameterDirection.Output;
        sqlParameter8.ParameterName = "@pt6";
        sqlParameter8.Size          = 4;
        SqlParameter sqlParameter9 = new SqlParameter();

        sqlParameter9.Direction     = ParameterDirection.Output;
        sqlParameter9.ParameterName = "@pt7";
        sqlParameter9.Size          = 4;
        SqlParameter sqlParameter10 = new SqlParameter();

        sqlParameter10.Direction     = ParameterDirection.Output;
        sqlParameter10.ParameterName = "@pt8";
        sqlParameter10.Size          = 4;
        SqlParameter sqlParameter11 = new SqlParameter();

        sqlParameter11.Direction     = ParameterDirection.Output;
        sqlParameter11.ParameterName = "@pt10";
        sqlParameter11.Size          = 4;
        SqlParameter sqlParameter12 = new SqlParameter();

        sqlParameter12.Direction     = ParameterDirection.Output;
        sqlParameter12.ParameterName = "@pt11";
        sqlParameter12.Size          = 4;
        SqlParameter sqlParameter13 = new SqlParameter();

        sqlParameter13.Direction     = ParameterDirection.Output;
        sqlParameter13.ParameterName = "@pt12";
        sqlParameter13.Size          = 4;
        SqlParameter sqlParameter14 = new SqlParameter();

        sqlParameter14.Direction     = ParameterDirection.Output;
        sqlParameter14.ParameterName = "@pt13";
        sqlParameter14.Size          = 4;
        SqlParameter[] cmdParms = new SqlParameter[]
        {
            sqlParameter3,
            sqlParameter4,
            sqlParameter5,
            sqlParameter6,
            sqlParameter7,
            sqlParameter8,
            sqlParameter9,
            sqlParameter10,
            sqlParameter11,
            sqlParameter12,
            sqlParameter13,
            sqlParameter14,
            sqlParameter,
            sqlParameter2
        };
        using (DataSet dataSet = MsSqlOperate.ExecuteDataset(CommandType.StoredProcedure, "Global_GetDesktopData", cmdParms))
        {
            this.news_num     = string.Concat(sqlParameter3.Value);
            this.mails_num1   = string.Concat(sqlParameter4.Value);
            this.mails_num2   = string.Concat(sqlParameter5.Value);
            this.flows_num1   = string.Concat(sqlParameter6.Value);
            this.flows_num2   = string.Concat(sqlParameter7.Value);
            this.calendar_num = string.Concat(sqlParameter8.Value);
            this.note_num     = string.Concat(sqlParameter9.Value);
            this.mydoc_num    = string.Concat(sqlParameter10.Value);
            this.shared_num   = string.Concat(sqlParameter11.Value);
            this.shared_num2  = string.Concat(sqlParameter12.Value);
            this.exe_num      = string.Concat(sqlParameter13.Value);
            this.man_num      = string.Concat(sqlParameter14.Value);
            this.forum_num    = string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, "select count(id) from wc_forum_reply1 where DateDiff(d,addtime,getdate())=0", new SqlParameter[0]));
            int num = 22;
            if (!string.IsNullOrEmpty(this.px))
            {
                int num2 = Convert.ToInt32(this.px.Split(new char[]
                {
                    '?'
                })[0]);
                if (num2 < 1030 && num2 > 1000)
                {
                    num = 22;
                }
                if (num2 < 1000)
                {
                    num = 18;
                }
                if (num2 > 1100 && num2 < 1300)
                {
                    num = 31;
                }
                if (num2 >= 1300)
                {
                    num = 36;
                }
            }
            for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++)
            {
                string text = string.Format(this.tmp, new object[]
                {
                    "/Manage/News/News_View.aspx?nid=" + dataSet.Tables[0].Rows[i]["id"],
                    dataSet.Tables[0].Rows[i]["NewsTitle"],
                    Utils.GetSubString2(string.Concat(dataSet.Tables[0].Rows[i]["NewsTitle"]), num, ".."),
                    Utils.ConvertDate(dataSet.Tables[0].Rows[i]["addtime"]),
                    "资讯" + (i + 1),
                    i
                });
                this.qyzx += text;
            }
            int num3 = 7 - dataSet.Tables[0].Rows.Count;
            for (int i = 0; i < num3; i++)
            {
                this.qyzx += this.block_line;
            }
            for (int i = 0; i < dataSet.Tables[1].Rows.Count; i++)
            {
                string text;
                if (string.Concat(dataSet.Tables[1].Rows[i]["isread"]) == "0")
                {
                    text = string.Format(this.tmp_noread, new object[]
                    {
                        "/Manage/Common/Mail_View.aspx?fid=0&mid=" + dataSet.Tables[1].Rows[i]["id"],
                        dataSet.Tables[1].Rows[i]["Subject"] + " - " + Utils.ConvertDate3(dataSet.Tables[1].Rows[i]["SendTime"]),
                        Utils.GetSubString2(string.Concat(dataSet.Tables[1].Rows[i]["Subject"]), num + 1, ".."),
                        dataSet.Tables[1].Rows[i]["SenderRealName"],
                        "未读邮件" + (i + 1),
                        i
                    });
                }
                else
                {
                    text = string.Format(this.tmp_hasread, new object[]
                    {
                        "/Manage/Common/Mail_View.aspx?fid=0&mid=" + dataSet.Tables[1].Rows[i]["id"],
                        dataSet.Tables[1].Rows[i]["Subject"] + " - " + Utils.ConvertDate3(dataSet.Tables[1].Rows[i]["SendTime"]),
                        Utils.GetSubString2(string.Concat(dataSet.Tables[1].Rows[i]["Subject"]), num + 1, ".."),
                        dataSet.Tables[1].Rows[i]["SenderRealName"],
                        "已读邮件" + (i + 1),
                        i
                    });
                }
                this.wdyj += text;
            }
            int num4 = 7 - dataSet.Tables[1].Rows.Count;
            for (int i = 0; i < num4; i++)
            {
                this.wdyj += this.block_line;
            }
            int num5 = 0;
            for (int i = 0; i < dataSet.Tables[2].Rows.Count; i++)
            {
                if (i < 7)
                {
                    string text2 = string.Concat(dataSet.Tables[2].Rows[i]["CreatorRealName"]);
                    string arg;
                    if (text2.Trim() == this.RealName)
                    {
                        arg = "[我的申请] ";
                    }
                    else
                    {
                        arg = "[审批/查阅] ";
                    }
                    string text = string.Format(this.tmp_flow, new object[]
                    {
                        "/Manage/Flow/Flow_View.aspx?fl=" + dataSet.Tables[2].Rows[i]["id"],
                        dataSet.Tables[2].Rows[i]["Flow_Name"],
                        Utils.GetSubString2(arg + dataSet.Tables[2].Rows[i]["Flow_Name"], num + 1, ".."),
                        dataSet.Tables[2].Rows[i]["CreatorRealName"],
                        "流程" + (i + 1),
                        i
                    });
                    if (!this.wdsp.Contains(text))
                    {
                        this.wdsp += text;
                    }
                    else
                    {
                        num5++;
                    }
                }
            }
            int num6 = 7 - Utils.GetSplitNum("<tr><td height=24>", this.wdsp);
            for (int i = 0; i < num6; i++)
            {
                this.wdsp += this.block_line;
            }
            Hashtable hashtable = (Hashtable)HttpContext.Current.Application["stand_config"];
            this.script = string.Concat(hashtable["index_tips"]);
            if (dataSet.Tables[3].Rows.Count > 0)
            {
                string format = " marqueecontent[{0}] = '{1}';  ";
                string str    = "";
                for (int i = 0; i < dataSet.Tables[3].Rows.Count; i++)
                {
                    str += string.Format(format, i, string.Concat(dataSet.Tables[3].Rows[i]["tips"]));
                }
                this.script = str;
            }
        }
    }
Exemplo n.º 14
0
    private void Show()
    {
        Hashtable hashtable = (Hashtable)HttpContext.Current.Application["config_fenye"];
        int       num       = Convert.ToInt32(hashtable["fenye_commom"]);
        int       num2      = 0;

        try
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["page"]))
            {
                num2 = Convert.ToInt32(base.Request.QueryString["page"]);
            }
        }
        catch
        {
        }
        if (num2 == 0)
        {
            num2 = 1;
        }
        int    num3  = num * (num2 - 1);
        string text  = base.Request.QueryString["keywords"];
        string text2 = base.Request.QueryString["action"];
        string text3 = "";

        if (text2 == "mydoc")
        {
            if (!string.IsNullOrEmpty(text))
            {
                text3 = string.Concat(new string[]
                {
                    " CreatorID=",
                    this.Uid,
                    " and (DocTitle like '%",
                    text,
                    "%' or CreatorRealName like '%",
                    text,
                    "%' ) "
                });
            }
            else
            {
                text3 = " CreatorID=" + this.Uid;
            }
            if (!string.IsNullOrEmpty(base.Request.QueryString["type"]))
            {
                text3 = " CreatorID=" + this.Uid + " and DocTypeID=" + base.Request.QueryString["type"];
            }
        }
        if (text2 == "shared")
        {
            if (!string.IsNullOrEmpty(text))
            {
                text3 = string.Concat(new string[]
                {
                    " CreatorID<>",
                    this.Uid,
                    " and IsShare=1 and ShareUsers like '%#",
                    this.Uid,
                    "#%'  and (DocTitle like '%",
                    text,
                    "%' or CreatorRealName like '%",
                    text,
                    "%' ) "
                });
            }
            else
            {
                text3 = string.Concat(new string[]
                {
                    " CreatorID<>",
                    this.Uid,
                    " and IsShare=1 and ShareUsers like '%#",
                    this.Uid,
                    "#%' "
                });
            }
        }
        int num4 = Convert.ToInt32(MsSqlOperate.ExecuteScalar(CommandType.Text, "select count(*) from Docs_Doc where " + text3, null));

        this.num.InnerHtml = "当前查询条件总计 - <span style='color:#ff0000; font-weight:bold;'>" + num4 + "</span> 条 记录数据";
        string sql = string.Concat(new object[]
        {
            "select top ",
            num,
            " * from Docs_Doc where ",
            text3,
            " order by id desc"
        });

        if (num2 != 1)
        {
            sql = string.Concat(new object[]
            {
                "SELECT TOP ",
                num,
                " * FROM Docs_Doc WHERE id<(SELECT MIN(id) FROM (SELECT TOP ",
                num3.ToString(),
                " id FROM Docs_Doc WHERE (",
                text3,
                " ) ORDER BY id DESC) T1) AND (",
                text3,
                " ) ORDER BY id DESC"
            });
        }
        this.Bind(sql, this.rpt);
        if (string.IsNullOrEmpty(text))
        {
            this.Page2.sty("meneame", num2, this.GetCountPage(num4, num), "?action=" + text2 + "&page=");
        }
        else
        {
            this.Page2.sty("meneame", num2, this.GetCountPage(num4, num), string.Concat(new string[]
            {
                "?action=",
                text2,
                "&keywords=",
                text,
                "&page="
            }));
        }
    }
Exemplo n.º 15
0
    private void Show1()
    {
        this.list1.Visible = true;
        string text = base.Request.QueryString["type"];
        int    num  = 60;
        int    num2 = 0;

        try
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["page"]))
            {
                num2 = Convert.ToInt32(base.Request.QueryString["page"]);
            }
        }
        catch
        {
        }
        if (num2 == 0)
        {
            num2 = 1;
        }
        int    num3  = num * (num2 - 1);
        string text2 = string.Concat(new string[]
        {
            " AttendType=",
            text,
            " and UID=",
            this.Uid,
            " "
        });
        string value = base.Request.QueryString["st"];

        if (!string.IsNullOrEmpty(value))
        {
            string text3 = base.Request.QueryString["st"];
            string text4 = base.Request.QueryString["et"];
            string text5 = text2;
            text2 = string.Concat(new string[]
            {
                text5,
                " and (addtime between '",
                text3,
                "' and '",
                text4,
                "') "
            });
        }
        else
        {
            text2 += " and datediff(d,addtime,getdate())<180 ";
        }
        int num4 = Convert.ToInt32(MsSqlOperate.ExecuteScalar(CommandType.Text, "select count(id) from Work_Attend where " + text2, null));

        this.num1.InnerHtml = "当前查询条件总计 - <span style='color:#ff0000; font-weight:bold;'>" + num4 + "</span> 条 记录数据";
        string sql = string.Concat(new object[]
        {
            "select top ",
            num,
            " * from Work_Attend where ",
            text2,
            " order by id desc"
        });

        if (num2 != 1)
        {
            sql = string.Concat(new object[]
            {
                "SELECT TOP ",
                num,
                " * FROM Work_Attend WHERE id<(SELECT MIN(id) FROM (SELECT TOP ",
                num3.ToString(),
                " id FROM Work_Attend WHERE (",
                text2,
                " ) ORDER BY id DESC) T1) AND (",
                text2,
                " ) ORDER BY id DESC"
            });
        }
        this.Bind(sql, this.rpt1);
        if (!string.IsNullOrEmpty(value))
        {
            this.Page1.sty("meneame", num2, this.GetCountPage(num4, num), string.Concat(new string[]
            {
                "?type=",
                text,
                "&st=",
                base.Request.QueryString["st"],
                "&et=",
                base.Request.QueryString["et"],
                "&page="
            }));
        }
        else
        {
            this.Page1.sty("meneame", num2, this.GetCountPage(num4, num), "?type=" + text + "&page=");
        }
    }
Exemplo n.º 16
0
 private string GetNumsByType(int typeid)
 {
     return(string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, "select count(id) from News_Article where typeid=" + typeid, new SqlParameter[0])));
 }
Exemplo n.º 17
0
    private IList GetAllNewsUser(string nid)
    {
        IList <Sys_UserInfo> list = new List <Sys_UserInfo>();
        string      cmdText       = "select ShareDeps from News_Article where id=" + nid;
        string      text          = string.Concat(MsSqlOperate.ExecuteScalar(CommandType.Text, cmdText, new SqlParameter[0]));
        IEnumerator enumerator;

        if (text.Contains(","))
        {
            string[] array = text.Split(new char[]
            {
                ','
            });
            string        text2 = "";
            List <string> list2 = new List <string>();
            for (int i = 0; i < array.Length; i++)
            {
                if (array[i].Contains("#"))
                {
                    string item = array[i].Split(new char[]
                    {
                        '#'
                    })[1];
                    list2.Add(item);
                }
            }
            string[] array2 = list2.ToArray();
            for (int i = 0; i < array2.Length; i++)
            {
                if (i != array2.Length - 1)
                {
                    text2 = text2 + " depid=" + array2[i] + " or ";
                }
                else
                {
                    text2 = text2 + " depid=" + array2[i] + " ";
                }
            }
            IList all = Sys_User.Init().GetAll(text2, null);
            enumerator = all.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    object       current = enumerator.Current;
                    Sys_UserInfo item2   = current as Sys_UserInfo;
                    list.Add(item2);
                }
                goto IL_1C3;
            }
            finally
            {
                IDisposable disposable = enumerator as IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
        }
        IList all2 = Sys_User.Init().GetAll("Status=0 and IsLock=0", null);

        enumerator = all2.GetEnumerator();
        try
        {
            while (enumerator.MoveNext())
            {
                object       current = enumerator.Current;
                Sys_UserInfo item2   = current as Sys_UserInfo;
                list.Add(item2);
            }
        }
        finally
        {
            IDisposable disposable = enumerator as IDisposable;
            if (disposable != null)
            {
                disposable.Dispose();
            }
        }
IL_1C3:
        return((IList)list);
    }
Exemplo n.º 18
0
    private void Show(string cid)
    {
        CRMInfo byId = CRM.Init().GetById(Convert.ToInt32(cid));

        this.CRM_Name1.InnerText = byId.CRM_Name;
        if (string.Concat(byId.CreatorID) != this.Uid)
        {
            this.div.Visible = false;
        }
        this.Grade.Text = Convert.ToString(byId.Grade).ToUpper() + " - " + this.GetGrade(byId.Grade);
        this.lx.Text    = string.Concat(new string[]
        {
            " <span style='color:#006600;font-weight:bold;'>电话:</span> ",
            byId.Tel,
            " &nbsp;&nbsp; <span style='color:#006600;font-weight:bold;'>传真:</span> ",
            byId.Fax,
            " &nbsp;&nbsp; <span style='color:#006600;font-weight:bold;'>邮编:</span> ",
            byId.Zip
        });
        this.hlw.Text = string.Concat(new string[]
        {
            " <span style='color:#006600;font-weight:bold;'>网站:</span> ",
            byId.Site,
            " &nbsp;&nbsp; <span style='color:#006600;font-weight:bold;'>QQ:</span> ",
            byId.QQ,
            " &nbsp;&nbsp; <span style='color:#006600;font-weight:bold;'>Email:</span> ",
            byId.Email
        });
        this.Address.Text    = byId.Address;
        this.MainPeople.Text = byId.MainPeople;
        this.Position.Text   = byId.Position;
        this.Product.Text    = byId.Product;
        this.TypeName.Text   = byId.TypeName;
        this.Notes.Text      = byId.Notes;
        string cmdText = "select count(*) from crm_contact where cid=" + cid;
        object obj     = MsSqlOperate.ExecuteScalar(CommandType.Text, cmdText, new SqlParameter[0]);

        this.Contact.Text = string.Concat(new object[]
        {
            "目前已接触 <strong>",
            obj,
            "</strong> 次 &nbsp;&nbsp;&nbsp;&nbsp; <a href=/manage/crm/CRM_Contact_List.aspx?cid=",
            cid,
            "><strong>查看接触详情</strong></a> &nbsp;&nbsp;&nbsp;&nbsp; <a href=/manage/crm/CRM_Contact_Manage.aspx?cid=",
            cid,
            "><strong>添加客户接触</strong></a>"
        });
        if (!string.IsNullOrEmpty(byId.FilePath))
        {
            string[] array = byId.FilePath.Split(new char[]
            {
                '|'
            });
            for (int i = 0; i < array.Length; i++)
            {
                if (array[i].Trim() != "")
                {
                    int    num = array[i].LastIndexOf('/') + 1;
                    string arg = array[i].Substring(num, array[i].Length - num);
                    string s   = array[i].Replace("~", "");
                    this.fjs += string.Format(this.fj, base.Server.UrlEncode(s), arg);
                }
            }
        }
    }