Exemplo n.º 1
0
        public List <Entity.CallinfoEntity> getpage(int pageSize, int pageNum, out int count, string str)
        {
            string select, table, where, order;

            select = " * ";

            table = "[OA_Callinfo] ";

            StringBuilder sb = new StringBuilder();

            sb.Append(" ( 1 = 1 ) " + str);

            where = sb.ToString();

            order = "Id";

            string sql = "exec Pagination @select, @table, @where, @orderField, @orderType, @pageSize, @pageNum ";

            SqlParameter[] paras =
            {
                new SqlParameter("@select",     select),
                new SqlParameter("@table",      table),
                new SqlParameter("@where",      where),
                new SqlParameter("@orderField", order),
                new SqlParameter("@orderType",  '1'),
                new SqlParameter("@pageSize",   pageSize),
                new SqlParameter("@pageNum",    pageNum)
            };

            DataSet ds = DbHelperSQL.Query(sql, paras);

            count = Convert.ToInt32(ds.Tables[1].Rows[0][0]);

            List <Entity.CallinfoEntity> list = new List <Entity.CallinfoEntity>();

            Entity.CallinfoEntity model;

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                model = new Entity.CallinfoEntity();

                if (ds.Tables[0].Rows[i]["Id"].ToString() != "")
                {
                    model.Id = int.Parse(ds.Tables[0].Rows[i]["Id"].ToString());
                }
                model.Addtime  = Convert.ToDateTime(ds.Tables[0].Rows[i]["Addtime"].ToString());
                model.Userinfo = ds.Tables[0].Rows[i]["Userinfo"].ToString();
                model.Unit     = ds.Tables[0].Rows[i]["Unit"].ToString();
                model.Title    = ds.Tables[0].Rows[i]["Title"].ToString();
                model.Uid      = Convert.ToInt32(ds.Tables[0].Rows[i]["Uid"].ToString());
                model.Reply    = ds.Tables[0].Rows[i]["Reply"].ToString();
                model.Remark   = ds.Tables[0].Rows[i]["Remark"].ToString();
                list.Add(model);
            }

            return(list);
        }
 void Bind_Callinfo()
 {
     int id = Str2Int(q("id"), 0);
     Entity.CallinfoEntity model = new Entity.CallinfoEntity();
     model = new JumbotOA.BLL.CallinfoBLL().GetEntity(id);
     this.lblTitle.Text = model.Title;
     this.lblAddtime.Text = model.Addtime.ToString();
     this.lblUnit.Text = model.Unit;
     this.lblUserinfo.Text = model.Userinfo;
     this.lblReply.Text = model.Reply;
     text = model.Remark;
 }
Exemplo n.º 3
0
        void Bind_Callinfo()
        {
            int id = Str2Int(q("id"), 0);

            Entity.CallinfoEntity model = new Entity.CallinfoEntity();
            model = new JumbotOA.BLL.CallinfoBLL().GetEntity(id);
            this.lblTitle.Text    = model.Title;
            this.lblAddtime.Text  = model.Addtime.ToString();
            this.lblUnit.Text     = model.Unit;
            this.lblUserinfo.Text = model.Userinfo;
            this.lblReply.Text    = model.Reply;
            text = model.Remark;
        }
 void Bind_Callinfo()
 {
     int id = Str2Int(q("id"), 0);
     Entity.CallinfoEntity model = new Entity.CallinfoEntity();
     model = new JumbotOA.BLL.CallinfoBLL().GetEntity(id);
     if (model.Uid != UserId)
     {
         FinalMessage("请勿违规操作", "", 100);
     }
     this.lblTitle.Text = model.Title;
     this.lblAddtime.Text = model.Addtime.ToString();
     this.lblUnit.Text = model.Unit;
     this.lblUserinfo.Text = model.Userinfo;
     this.lblReply.Text = model.Reply;
     text = model.Remark;
 }
        void Bind_Callinfo()
        {
            int id = Str2Int(q("id"), 0);

            Entity.CallinfoEntity model = new Entity.CallinfoEntity();
            model = new JumbotOA.BLL.CallinfoBLL().GetEntity(id);
            if (model.Uid != UserId)
            {
                FinalMessage("请勿违规操作", "", 100);
            }
            this.lblTitle.Text    = model.Title;
            this.lblAddtime.Text  = model.Addtime.ToString();
            this.lblUnit.Text     = model.Unit;
            this.lblUserinfo.Text = model.Userinfo;
            this.lblReply.Text    = model.Reply;
            text = model.Remark;
        }
 protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
 {
     Entity.CallinfoEntity callinfo = new Entity.CallinfoEntity();
     callinfo.Uid = UserId;
     callinfo.Addtime = Convert.ToDateTime(this.txtAddtime.Text);
     callinfo.Title = this.txtTitle.Text;
     callinfo.Unit = this.txtUnit.Text;
     callinfo.Reply = this.txtReply.Text;
     callinfo.Userinfo = this.txtUserinfo.Text;
     callinfo.Remark = this.FCKeditor1.Value;
     int i = new JumbotOA.BLL.CallinfoBLL().Add(callinfo);
     if (i > 0)
     {
         FinalMessage("操作成功", "My_Callinfo_List.aspx", 0);
     }
     else
     {
         FinalMessage("操作失败", "My_Callinfo_List.aspx", 0);
     }
 }
Exemplo n.º 7
0
        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            Entity.CallinfoEntity callinfo = new Entity.CallinfoEntity();
            callinfo.Uid      = UserId;
            callinfo.Addtime  = Convert.ToDateTime(this.txtAddtime.Text);
            callinfo.Title    = this.txtTitle.Text;
            callinfo.Unit     = this.txtUnit.Text;
            callinfo.Reply    = this.txtReply.Text;
            callinfo.Userinfo = this.txtUserinfo.Text;
            callinfo.Remark   = this.kindeditor.Value;
            int i = new Daiv_OA.BLL.CallinfoBLL().Add(callinfo);

            if (i > 0)
            {
                FinalMessage("操作成功", "My_Callinfo_List.aspx", 0);
            }
            else
            {
                FinalMessage("操作失败", "My_Callinfo_List.aspx", 0);
            }
        }
        public List<Entity.CallinfoEntity> getpage(int pageSize, int pageNum, out int count, string str)
        {
            string select, table, where, order;

            select = " * ";

            table = "[OA_Callinfo] ";

            StringBuilder sb = new StringBuilder();
            sb.Append(" ( 1 = 1 ) " + str);

            where = sb.ToString();

            order = "Id";

            string sql = "exec Pagination @select, @table, @where, @orderField, @orderType, @pageSize, @pageNum ";

            SqlParameter[] paras ={
                new SqlParameter("@select",     select),
                new SqlParameter("@table",      table),
                new SqlParameter("@where",      where),
                new SqlParameter("@orderField", order),
                new SqlParameter("@orderType",  '1'),
                new SqlParameter("@pageSize",   pageSize),
                new SqlParameter("@pageNum",    pageNum)
            };

            DataSet ds = DbHelperSQL.Query(sql, paras);

            count = Convert.ToInt32(ds.Tables[1].Rows[0][0]);

            List<Entity.CallinfoEntity> list = new List<Entity.CallinfoEntity>();
            Entity.CallinfoEntity model;

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                model = new Entity.CallinfoEntity();

                if (ds.Tables[0].Rows[i]["Id"].ToString() != "")
                {
                    model.Id = int.Parse(ds.Tables[0].Rows[i]["Id"].ToString());
                }
                model.Addtime = Convert.ToDateTime(ds.Tables[0].Rows[i]["Addtime"].ToString());
                model.Userinfo = ds.Tables[0].Rows[i]["Userinfo"].ToString();
                model.Unit = ds.Tables[0].Rows[i]["Unit"].ToString();
                model.Title = ds.Tables[0].Rows[i]["Title"].ToString();
                model.Uid = Convert.ToInt32(ds.Tables[0].Rows[i]["Uid"].ToString());
                model.Reply = ds.Tables[0].Rows[i]["Reply"].ToString();
                model.Remark = ds.Tables[0].Rows[i]["Remark"].ToString();
                list.Add(model);
            }

            return list;
        }