示例#1
0
        public int CheckApply(JRCPApply jrcpapply)
        {
            string    sql = "select * from JRCPApply where 1=1 and Status= 0 and ApplyEnterpriseId = '" + jrcpapply.ApplyEnterpriseId + "' and JRCPID ='" + jrcpapply.JRCPID + "'";
            DataTable dt  = DBHelper.GetDataSet(sql);

            return(dt.Rows.Count);
        }
示例#2
0
        public bool Add(JRCPApply jrcpapply)
        {
            string sql = @"insert into JRCPApply(JRCPID,ApplyEnterpriseId,ApplyEnterpriseName,Phone)values(@JRCPID,@ApplyEnterpriseId,@ApplyEnterpriseName,@Phone)";
            int?   id  = DBHelper.Execute(sql,
                                          new SqlParameter("@JRCPID", jrcpapply.JRCPID),
                                          new SqlParameter("@ApplyEnterpriseId", jrcpapply.ApplyEnterpriseId),
                                          new SqlParameter("@ApplyEnterpriseName", jrcpapply.ApplyEnterpriseName),
                                          new SqlParameter("@Phone", jrcpapply.Phone)) as int?;

            if (id > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }