Beispiel #1
0
    protected void btnconfirm_Click(object sender, EventArgs e)
    {
        softEntity soft = new softEntity();
        soft.Spname = this.txtspname.Text;
        soft.Sregstyle = this.dropsregstyle.SelectedItem.Text;
        soft.Sregdate = this.txtsregdate.Text;
        soft.Sregdcount = this.txtsregdcount.Text;
        soft.Senddate = this.txtsenddate.Text;
        soft.Squsetion = this.txtsqusetion.Text;
        soft.Sothercode = this.txtsothercode.Text;
        soft.Suomcode = this.txtsuomcode.Text;
        soft.Srole = this.txtsrole.Text;
        soft.Sregcode = this.txtsregcode.Text;
        soft.Sreader = "admin";//Session["username"].ToString();

        if (cid != "")
        {
            soft.Id = cid;
            int iu = softbll.updateCusnote(soft);
            if (iu > 0)
            {
                js("成功更新客户软件注册信息!");
            }
        }
        else
        {

            int i = softbll.insertCusnote(soft);
            if (i > 0)
            {
                js("成功增加客户软件注册信息!");
            }
        }
        Response.Redirect("softManage.aspx");
    }
Beispiel #2
0
        /// <summary>
        /// �������
        /// </summary>
        /// <param name="mark"></param>
        /// <param name="custinfo"></param>
        /// <returns></returns>
        public static int Getcustinfocount(string mark, softEntity cus)
        {
            string strWhere = "";
            if (mark == "begin")
            {
                strWhere = "";
            }
            else
            {
                strWhere = " spname like '" + cus.Spname + "%' ";
            }

            return conString.Getcommentcount("custom_soft", "id", strWhere);
        }
Beispiel #3
0
 /// <summary>
 /// ��ü�¼��Ϣ��
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public static softEntity getcusnoteInfo(string id)
 {
     softEntity note = new softEntity();
     string sql = "select * from custom_soft where id=" + id;
     using (SqlDataReader dr = SqlHelper.ExecuteReader(DataBll.conString.constr, CommandType.Text, sql))
     {
         if (dr.Read())
         {
             note.Spname = dr["spname"].ToString();
             note.Sregstyle = dr["sregstyle"].ToString();
             note.Sregdate = dr["sregdate"].ToString();
             note.Sregdcount = dr["sregdcount"].ToString();
             note.Senddate = dr["senddate"].ToString();
             note.Squsetion = dr["squsetion"].ToString();
             note.Sothercode = dr["sothercode"].ToString();
             note.Suomcode = dr["suomcode"].ToString();
             note.Srole = dr["srole"].ToString();
             note.Sregcode = dr["sregcode"].ToString();
             note.Sreader = dr["sreader"].ToString();
         }
     }
     return note;
 }
Beispiel #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="mark"></param>
 /// <param name="pi"></param>
 /// <param name="ps"></param>
 /// <param name="cus"></param>
 /// <returns></returns>
 public static DataSet getCustominfo(string mark, int pi, int ps, softEntity cus)
 {
     string tablename = " custom_soft ";
     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 = " spname like '" + cus.Spname + "%' ";
     }
     string strM = "id";
     return conString.GetcommdataSource(tablename, PrimaryKey, sortfld, pagesize, pageindex, sortType, strWhere, strM, selecfld);
 }
Beispiel #5
0
 /// <summary>
 /// ��������
 /// </summary>
 /// <param name="note"></param>
 /// <returns></returns>
 public static int updateCusnote(softEntity note)
 {
     string sql = "update custom_soft set spname='" + note.Spname + "',sregstyle='" + note.Sregstyle + "',sregdate='" + note.Sregdate + "',sregdcount='" + note.Sregdcount + "',senddate='" + note.Senddate + "',squsetion='" + note.Squsetion + "',sothercode='" + note.Sothercode + "',suomcode='" + note.Suomcode + "',srole='" + note.Srole + "',sregcode='" + note.Sregcode + "',sreader='" + note.Sreader + "' where id=" + note.Id.ToString();
     return SqlHelper.ExecuteNonQuery(DataBll.conString.constr, CommandType.Text, sql);
 }
Beispiel #6
0
 /// <summary>
 /// �����¼��Ϣ
 /// </summary>
 /// <param name="note"></param>
 /// <returns></returns>
 public static int insertCusnote(softEntity note)
 {
     string sql = "insert into custom_soft ( spname,sregstyle,sregdate,sregdcount,senddate,squsetion,sothercode,suomcode,srole,sregcode,sreader) values"; sql += "('" + note.Spname + "','" + note.Sregstyle + "','" + note.Sregdate + "','" + note.Sregdcount + "','" + note.Senddate + "','" + note.Squsetion + "','" + note.Sothercode + "','" + note.Suomcode + "','" + note.Srole + "','" + note.Sregcode + "','" + note.Sreader + "')";
     return SqlHelper.ExecuteNonQuery(DataBll.conString.constr, CommandType.Text, sql);
 }
Beispiel #7
0
 void bindlikedata(int pi, int ps, softEntity custinfo)
 {
     ds = softbll.getCustominfo("", pi, ps, custinfo);
     this.Repeater1.DataSource = ds;
     this.Repeater1.DataBind();
     int pagecount = softbll.Getcustinfocount("", custinfo);
     this.AspNetPager1.PageSize = pageSize;
     this.AspNetPager1.RecordCount = pagecount;
     this.AspNetPager1.CustomInfoHTML = "总:" + AspNetPager1.RecordCount.ToString() + "条,每页:%PageSize%条,当前:%CurrentPageIndex%/%PageCount%";
 }