Example #1
0
 /// <summary>
 /// ��ü�¼��Ϣ��
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public static selfmarkEntity getcusnoteInfo(string id)
 {
     selfmarkEntity note = new selfmarkEntity();
     string sql = "select * from self_mark where id=" + id;
     using (SqlDataReader dr = SqlHelper.ExecuteReader(DataBll.conString.constr, CommandType.Text, sql))
     {
         if (dr.Read())
         {
             note.Pname = dr["pname"].ToString();
             note.Plike = dr["plike"].ToString();
             note.Selftype = dr["selftype"].ToString();
             note.Sqj = dr["sqj"].ToString();
             note.Ptel = dr["ptel"].ToString();
             note.Sdate = dr["sdate"].ToString();
             note.Stitle = dr["stitle"].ToString();
             note.Squestion = dr["squestion"].ToString();
             note.Sfinisher = dr["sfinisher"].ToString();
             note.Soper = dr["soper"].ToString();
             note.Bsdate = dr["bsdate"].ToString();
             note.Esdate = dr["esdate"].ToString();
             note.Sstatus = dr["sstatus"].ToString();
             note.Sstyle = dr["sstyle"].ToString();
             note.Smoney = dr["smoney"].ToString();
             note.Sqi = dr["sqi"].ToString();
             note.Sqer = dr["sqer"].ToString();
             note.Sqoper = dr["sqoper"].ToString();
             note.Sreader = dr["sreader"].ToString();
             note.Srdate = dr["srdate"].ToString();
         }
     }
     return note;
 }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request.QueryString["id"]))
         {
             this.txtcid.Text = Request.QueryString["id"].ToString();
             oper = selfmarkBll.getcusnoteInfo(Request.QueryString["id"]);
             oper.Sfinisher = Jxb.Common.PublicMethod.GetWenJian(oper.Sfinisher, "../UploadFile/");
         }
     }
 }
Example #3
0
 public static int getCommcount(string mark, selfmarkEntity custinfo)
 {
     string strWhere = "";
     if (mark == "begin")
     {
         strWhere = "";
     }
     else
     {
         strWhere = " pname like '" + custinfo.Pname + "%' and   convert(datetime,sdate) >= convert(datetime, '" + custinfo.Btime + "') and convert(datetime,sdate) <= convert(datetime,'" + custinfo.Etime + "')  and selftype like '" + custinfo.Selftype + "%'";
     }
     return conString.Getcommentcount("self_mark", "id", strWhere);
 }
Example #4
0
    protected void btnconfirm_Click(object sender, EventArgs e)
    {
        selfmarkEntity self = new selfmarkEntity();
        self.Pname = this.txtpname.Text;
        self.Plike = this.txtplike.Text;
        self.Selftype = this.dropselftype.SelectedItem.Text;
        self.Sqj = this.dropsqj.Text;
        self.Ptel = this.txtptel.Text;
        self.Sdate = this.txtsdate.Text;
        self.Stitle = this.txtstitle.Text;
        self.Squestion = this.txtsquestion.Text;
        self.Sfinisher = Jxb.Common.PublicMethod.GetSessionValue("WenJianList");
        self.Soper = this.dropsoper.SelectedItem.Text;
        self.Bsdate = this.txtbsdate.Text;
        self.Esdate = this.txtesdate.Text;
        self.Sstatus = this.dropsstatus.SelectedItem.Text;
        self.Sstyle = this.dropsstyle.SelectedItem.Text;
        self.Smoney = this.txtsmoney.Text;
        self.Sqi = this.txtsqi.Text;
        self.Sqer = this.txtsqer.Text;
        self.Sqoper = this.dropsqoper.SelectedItem.Text;
        self.Sreader = Session["username"].ToString();//"honey";//session
        self.Srdate = DateTime.Now.ToString();
        if (Request.QueryString["action"] == "update")
        {
            self.Id = cid;
            int i = selfmarkBll.updateCusnote(self);
            if (i > 0)
            {
                js("更新成功!");
                action = "";

            }
        }
        else
        {
            int i = selfmarkBll.insertCusnote(self);
            if (i > 0)
            {
                js("录入成功!");
            }
        }
        Response.Redirect("cusmarkList.aspx");
    }
Example #5
0
        public static DataSet getCusnoteinfo(string mark, int pi, int ps, selfmarkEntity custinfo)
        {
            string tablename = " self_mark ";
            string sortfld = " id ";
            string selecfld = " *";
            string PrimaryKey = "id";
            int pageindex = pi;
            int pagesize = ps;
            int sortType = 1;
            string strWhere = "";
            if (mark == "begin")
            {

                strWhere = "";
            }
            else
            {
                strWhere = " pname like '" + custinfo.Pname + "%' and   convert(datetime,sdate) >= convert(datetime, '" + custinfo.Btime + "') and convert(datetime,sdate) <= convert(datetime,'" + custinfo.Etime + "')  and selftype like '"+custinfo.Selftype+"%'";
            }
            string strM = "id";
            return conString.GetcommdataSource(tablename, PrimaryKey, sortfld, pagesize, pageindex, sortType, strWhere, strM, selecfld);
        }
Example #6
0
 /// <summary>
 /// ��������
 /// </summary>
 /// <param name="note"></param>
 /// <returns></returns>
 public static int updateCusnote(selfmarkEntity note)
 {
     string sql = "update self_mark set pname='" + note.Pname + "',plike='" + note.Plike + "',selftype='" + note.Selftype + "',sqj='" + note.Sqj + "',ptel='" + note.Ptel + "',sdate='" + note.Sdate + "',stitle='" + note.Stitle + "',squestion='" + note.Squestion + "',sfinisher='" + note.Sfinisher + "',soper='" + note.Soper + "',bsdate='" + note.Bsdate + "',esdate='" + note.Esdate + "',sstatus='" + note.Sstatus + "',sstyle='" + note.Sstyle + "',smoney='" + note.Smoney + "',sqi='" + note.Sqi + "',sqer='" + note.Sqer + "',sqoper='" + note.Sqoper + "',sreader='" + note.Sreader + "',srdate='" + note.Srdate + "' where id=" + note.Id.ToString();
     return SqlHelper.ExecuteNonQuery(DataBll.conString.constr, CommandType.Text, sql);
 }
Example #7
0
 /// <summary>
 /// �����¼��Ϣ
 /// </summary>
 /// <param name="note"></param>
 /// <returns></returns>
 public static int insertCusnote(selfmarkEntity note)
 {
     string sql = "insert into self_mark ( pname,plike,selftype,sqj,ptel,sdate,stitle,squestion,sfinisher,soper,bsdate,esdate,sstatus,sstyle,smoney,sqi,sqer,sqoper,sreader,srdate) values";
     sql += "('" + note.Pname + "','" + note.Plike + "','" + note.Selftype + "','" + note.Sqj + "','" + note.Ptel + "','" + note.Sdate + "','" + note.Stitle + "','" + note.Squestion + "','" + note.Sfinisher + "','" + note.Soper + "','" + note.Bsdate + "','" + note.Esdate + "','" + note.Sstatus + "','" + note.Sstyle + "','" + note.Smoney + "','" + note.Sqi + "','" + note.Sqer + "','" + note.Sqoper + "','" + note.Sreader + "','" + note.Srdate + "')";
     return SqlHelper.ExecuteNonQuery(DataBll.conString.constr, CommandType.Text, sql);
 }
Example #8
0
 public string getcusnoteInfoByName(string strWhere)
 {
     selfmarkEntity note = new selfmarkEntity();
     string sql = "select * from self_mark ";
     if (strWhere.Trim() != "")
     {
         sql += " where pname='" + strWhere + "' order by sdate desc";
     }
     DataTable dt = DbHelperSQL.Query(sql.ToString()).Tables[0];
     return getJson(dt);
 }
Example #9
0
 void bindlikedata(int pi, int ps, selfmarkEntity custinfo)
 {
     this.Repeater1.DataSource = selfmarkBll.getCusnoteinfo("", pi, ps, custinfo);
     this.Repeater1.DataBind();
     int pagecount = selfmarkBll.getCommcount("", custinfo);
     this.AspNetPager1.PageSize = pageSize;
     this.AspNetPager1.RecordCount = pagecount;
     this.AspNetPager1.CustomInfoHTML = "总:" + AspNetPager1.RecordCount.ToString() + "条,每页:%PageSize%条,当前:%CurrentPageIndex%/%PageCount%";
 }