Exemple #1
0
        /// <summary>
        /// ��ü�¼��Ϣ��
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static concatchEntity getcusnoteInfo(string id)
        {
            concatchEntity note = new concatchEntity();
            string sql = "select * from contract_catch where id=" + id;
            using (SqlDataReader dr = SqlHelper.ExecuteReader(DataBll.conString.constr, CommandType.Text, sql))
            {
                if (dr.Read())
                {

                    note.Ccname = dr["ccname"].ToString();
                    note.Ccdate = dr["ccdate"].ToString();

                    note.Ctitle = dr["ctitle"].ToString();
                    note.Ccontent = dr["ccontent"].ToString();
                    note.Coper = dr["coper"].ToString();
                    note.Csection = dr["csection"].ToString();
                    note.Cdate = dr["cdate"].ToString();
                    note.Cuser = dr["cuser"].ToString();
                    note.Clinkwork = dr["clinkwork"].ToString();
                    note.Clinkuser = dr["clinkuser"].ToString();
                    note.Clinktel = dr["clinktel"].ToString();
                    note.Clinkpho = dr["clinkpho"].ToString();
                    note.Clinkaddress = dr["clinkaddress"].ToString();

                }
            }
            return note;
        }
Exemple #2
0
        public static int getCommcount(string mark, concatchEntity custinfo)
        {
            string strWhere = "";
            if (mark == "begin")
            {
                if (custinfo.Cuser.Split('_')[1] == "1")//�����ϵͳ����Ա�鿴ȫ��
                {
                    strWhere = "";
                }
                else
                {
                    strWhere = " cuser = '******'_')[0] + "'";
                }
            }
            else
            {
                if (custinfo.Cuser.Split('_')[1] == "1")//�����ϵͳ����Ա�鿴ȫ�� ͨ����ɫID���ж�
                {
                    strWhere = " ccname like '" + custinfo.Cname + "%' and   convert(datetime,ccdate) >= convert(datetime, '" + custinfo.Btime + "') and convert(datetime,ccdate) <= convert(datetime,'" + custinfo.Etime + "')  and ctitle like '" + custinfo.Ctitle + "%'";

                }
                else
                {
                    strWhere = " cuser='******'_')[0] + "' and ccname like '" + custinfo.Cname + "%' and   convert(datetime,ccdate) >= convert(datetime, '" + custinfo.Btime + "') and convert(datetime,ccdate) <= convert(datetime,'" + custinfo.Etime + "')  and ctitle like '" + custinfo.Ctitle + "%'";
                }
            }
            return conString.Getcommentcount("contract_catch", "id", strWhere);
        }
Exemple #3
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 = contransBll.getcusnoteInfo(Request.QueryString["id"]);
         }
     }
 }
Exemple #4
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        concatchEntity self = new concatchEntity();

        self.Ccname = this.txtccname.Text;
        self.Ccdate = this.txtccdate.Text;
        self.Clinkpho = this.txtlinkpho.Text;
        self.Clinktel = this.txtlinktel.Text;
        self.Clinkuser = this.txtlinkuser.Text;
        self.Clinkwork = this.txtlinkwork.Text;
        self.Clinkaddress = this.txtlinkaddress.Text;
        self.Ctitle = this.txtctitle.Text;
        self.Ccontent = this.txtccontent.Text;
        self.Coper = this.dropoper.SelectedItem.Text;
        self.Csection = this.dropcsection.SelectedItem.Text;

        self.Cuser = Session["username"].ToString();//"honey";//session
        self.Cdate = DateTime.Now.ToString();

        if (Request.QueryString["action"] == "update")
        {
            self.Id = cid;
            int i = contransBll.updateCusnote(self);
            if (i > 0)
            {
                js("更新成功!");
                action = "";
            }
        }
        else
        {
            int i = contransBll.insertCusnote(self);
            if (i > 0)
            {
                js("录入成功!");
            }
        }
        Response.Redirect("contranList.aspx");
    }
Exemple #5
0
 void bindlikedata(int pi, int ps, concatchEntity custinfo)
 {
     this.Repeater1.DataSource = contransBll.getCusnoteinfo("", pi, ps, custinfo);
     this.Repeater1.DataBind();
     int pagecount = contransBll.getCommcount("", custinfo);
     this.AspNetPager1.PageSize = pageSize;
     this.AspNetPager1.RecordCount = pagecount;
     this.AspNetPager1.CustomInfoHTML = "总:" + AspNetPager1.RecordCount.ToString() + "条,每页:%PageSize%条,当前:%CurrentPageIndex%/%PageCount%";
 }
Exemple #6
0
        public static DataSet getCusnoteinfo(string mark, int pi, int ps, concatchEntity custinfo)
        {
            string tablename = " contract_catch  ";
            string sortfld = " id ";
            string selecfld = " *";
            string PrimaryKey = "id";
            int pageindex = pi;
            int pagesize = ps;
            int sortType = 1;
            string strWhere = "";
            if (mark == "begin")
            {
                if (custinfo.Cuser.Split('_')[1] == "1")//�����ϵͳ����Ա�鿴ȫ��
                {
                    strWhere = "";
                }
                else
                {
                    strWhere = " cuser = '******'_')[0] + "'";
                }
            }
            else
            {
                if (custinfo.Cuser.Split('_')[1] == "1")//�����ϵͳ����Ա�鿴ȫ�� ͨ����ɫID���ж�
                {
                    strWhere = " ccname like '" + custinfo.Cname + "%' and   convert(datetime,ccdate) >= convert(datetime, '" + custinfo.Btime + "') and convert(datetime,ccdate) <= convert(datetime,'" + custinfo.Etime + "')  and ctitle like '" + custinfo.Ctitle + "%'";

                }
                else
                {
                    strWhere = " cuser='******'_')[0] + "' and ccname like '" + custinfo.Cname + "%' and   convert(datetime,ccdate) >= convert(datetime, '" + custinfo.Btime + "') and convert(datetime,ccdate) <= convert(datetime,'" + custinfo.Etime + "')  and ctitle like '" + custinfo.Ctitle + "%'";
                }
            }
            string strM = "id";
            return conString.GetcommdataSource(tablename, PrimaryKey, sortfld, pagesize, pageindex, sortType, strWhere, strM, selecfld);
        }
Exemple #7
0
 /// <summary>
 /// ��������
 /// </summary>
 /// <param name="note"></param>
 /// <returns></returns>
 public static int updateCusnote(concatchEntity note)
 {
     string sql = "update contract_catch set ccname='" + note.Ccname + "',ccdate='" + note.Ccdate + "',ctitle='" + note.Ctitle + "',ccontent='" + note.Ccontent + "',coper='" + note.Coper + "',csection='" + note.Csection + "',cdate='" + note.Cdate + "',cuser='******',clinkuser='******',clinktel='"+note.Clinktel+"',clinkpho='"+note.Clinkpho+"',clinkaddress='"+note.Clinkaddress+"',clinkwork='"+note.Clinkwork+"' where id=" + note.Id.ToString();
     return SqlHelper.ExecuteNonQuery(DataBll.conString.constr, CommandType.Text, sql);
 }
Exemple #8
0
 /// <summary>
 ///�����¼��Ϣ
 /// </summary>
 /// <param name="note"></param>
 /// <returns></returns>
 public static int insertCusnote(concatchEntity note)
 {
     string sql = "insert into contract_catch ( ccname,ccdate,ctitle,ccontent,coper,csection,cdate,cuser,clinkuser,clinktel,clinkpho,clinkaddress,clinkwork) values"; sql += "('" + note.Ccname + "','" + note.Ccdate + "','" + note.Ctitle + "','" + note.Ccontent + "','" + note.Coper + "','" + note.Csection + "','" + note.Cdate + "','" + note.Cuser + "','"+note.Clinkuser+"','"+note.Clinktel+"','"+note.Clinkpho+"','"+note.Clinkaddress+"','"+note.Clinkwork+"')";
     return SqlHelper.ExecuteNonQuery(DataBll.conString.constr, CommandType.Text, sql);
 }