Esempio n. 1
0
        /// <summary>
        /// 调用存储过程修改一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>更新成功返回ture,否则返回false</returns>
        public static bool TiMuNeiRongEdit(Entity.TiMuNeiRong info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@Id",               SqlDbType.Int,       4, info.Id),
                SqlDB.MakeInParam("@gid",              SqlDbType.VarChar,  50, info.gid),
                SqlDB.MakeInParam("@content",          SqlDbType.NText,     0, info.content),
                SqlDB.MakeInParam("@objective_answer", SqlDbType.NVarChar, 64, info.objective_answer),
                SqlDB.MakeInParam("@answer",           SqlDbType.NText,     0, info.answer),
                SqlDB.MakeInParam("@subject_id",       SqlDbType.Int,       4, info.subject_id),
            };
            int intReturnValue = 0;

            intReturnValue = SqlDB.ExecuteNonQuery(strCon, CommandType.StoredProcedure, "TiMuNeiRongEdit", prams);
            if (intReturnValue == 1)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
        /// <summary>
        /// 获取某一个实体
        /// </summary>
        /// <param name="Id">标识</param>
        /// <returns>返回Entity</returns>
        public static Entity.KM KMEntityGet(int Id)
        {
            Entity.KM info = new Entity.KM();
            DataTable dt   = SqlDB.ExecuteDataset(CommandType.Text, "SELECT * FROM [KM] WHERE Id = " + Id + ";").Tables[0];

            if (dt.Rows.Count > 0)
            {
                info.Id       = Basic.Utils.StrToInt(dt.Rows[0]["Id"].ToString(), 0);
                info.Title    = dt.Rows[0]["Title"].ToString();
                info.ParentId = Basic.Utils.StrToInt(dt.Rows[0]["ParentId"].ToString(), 0);
                info.Url      = dt.Rows[0]["Url"].ToString();
                info.Content1 = dt.Rows[0]["Content1"].ToString();
                info.LinkId   = Basic.Utils.StrToInt(dt.Rows[0]["LinkId"].ToString(), 0);
                info.ClassTy  = Basic.Utils.StrToInt(dt.Rows[0]["ClassTy"].ToString(), 0);
                info.Content2 = dt.Rows[0]["Content2"].ToString();
                info.Content3 = dt.Rows[0]["Content3"].ToString();
                return(info);
            }
            return(null);
        }
Esempio n. 3
0
        /// <summary>
        /// 获取某一个实体
        /// </summary>
        /// <param name="Id">标识</param>
        /// <returns>返回Entity</returns>
        //public static Entity.ProvinceZhiYuan ProvinceZhiYuanEntityGet(int Id)
        //{
        //    Entity.ProvinceZhiYuan info = new Entity.ProvinceZhiYuan();
        //    DataTable dt = SqlDB.ExecuteDataset(CommandType.Text, "SELECT * FROM [ProvinceZhiYuan] WHERE Id = "+Id+";").Tables[0];
        //    if(dt.Rows.Count >0)
        //    {
        //        info.Id = Basic.Utils.StrToInt(dt.Rows[0]["Id"].ToString(),0);
        //        info.ProvincePcId = Basic.Utils.StrToInt(dt.Rows[0]["ProvincePcId"].ToString(), 0);
        //        info.ZhiYuanMing = dt.Rows[0]["ZhiYuanMing"].ToString();
        //        info.Suggestion = dt.Rows[0]["Suggestion"].ToString();
        //        info.ShowOrder = Basic.Utils.StrToInt(dt.Rows[0]["ShowOrder"].ToString(),0);
        //        info.IsPause = Basic.Utils.StrToInt(dt.Rows[0]["IsPause"].ToString(), 0);
        //        return info;
        //    }
        //    else
        //    {
        //        return null;
        //    }
        //}


        public static Entity.ProvinceZhiYuan ProvinceZhiYuanEntityGet(int ProvincePcId)
        {
            Entity.ProvinceZhiYuan info = new Entity.ProvinceZhiYuan();
            DataTable dt = SqlDB.ExecuteDataset(CommandType.Text, "SELECT * FROM [ProvinceZhiYuan] WHERE ProvincePcId = " + ProvincePcId + ";").Tables[0];

            if (dt.Rows.Count > 0)
            {
                info.Id           = Basic.Utils.StrToInt(dt.Rows[0]["Id"].ToString(), 0);
                info.ProvincePcId = Basic.Utils.StrToInt(dt.Rows[0]["ProvincePcId"].ToString(), 0);
                info.ZhiYuanMing  = dt.Rows[0]["ZhiYuanMing"].ToString();
                info.Suggestion   = dt.Rows[0]["Suggestion"].ToString();
                info.ShowOrder    = Basic.Utils.StrToInt(dt.Rows[0]["ShowOrder"].ToString(), 0);
                info.IsPause      = Basic.Utils.StrToInt(dt.Rows[0]["IsPause"].ToString(), 0);
                return(info);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 调用存储过程修改一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>更新成功返回ture,否则返回false</returns>
        public static bool ProvinceZhiYuanEdit(Entity.ProvinceZhiYuan info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@Id",           SqlDbType.Int,        4, info.Id),
                SqlDB.MakeInParam("@ProvincePcId", SqlDbType.Int,        4, info.ProvincePcId),
                SqlDB.MakeInParam("@ZhiYuanMing",  SqlDbType.NVarChar,  50, info.ZhiYuanMing),
                SqlDB.MakeInParam("@Suggestion",   SqlDbType.NVarChar, 500, info.Suggestion),
                SqlDB.MakeInParam("@ShowOrder",    SqlDbType.Int,        4, info.ShowOrder),
                SqlDB.MakeInParam("@IsPause",      SqlDbType.Int,        4, info.IsPause),
            };
            int intReturnValue = 0;

            intReturnValue = SqlDB.ExecuteNonQuery(CommandType.StoredProcedure, "ProvinceZhiYuanEdit", prams);
            if (intReturnValue == 1)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 5
0
        /// <summary>
        /// 调用存储过程增加一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
        public static int ProvinceConfigAdd(Entity.ProvinceConfig info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@ProvinceId",              SqlDbType.Int,      4, info.ProvinceId),
                SqlDB.MakeInParam("@HasTiQianPi",             SqlDbType.Int,      4, info.HasTiQianPi),
                SqlDB.MakeInParam("@HasZhuanKe",              SqlDbType.Int,      4, info.HasZhuanKe),
                SqlDB.MakeInParam("@HasZhuanKe",              SqlDbType.Int,      4, info.HasZhuanKe),

                SqlDB.MakeInParam("@HasZhuanKeZhuanYe",       SqlDbType.Int,      4, info.HasZhuanKeZhuanYe),
                SqlDB.MakeInParam("@OwnTable",                SqlDbType.Int,      4, info.OwnTable),
                SqlDB.MakeInParam("@ChangeEndTime",           SqlDbType.DateTime, 8, info.ChangeEndTime),
                SqlDB.MakeInParam("@ReStartTime",             SqlDbType.DateTime, 8, info.ReStartTime),
                SqlDB.MakeInParam("@LatestProvinceWeiCiYear", SqlDbType.Int,      4, info.LatestProvinceWeiCiYear),
                SqlDB.MakeInParam("@LatestBenKeYear",         SqlDbType.Int,      4, info.LatestBenKeYear),
                SqlDB.MakeInParam("@LatestBenKeZhuanYeYear",  SqlDbType.Int,      4, info.LatestBenKeZhuanYeYear),
                SqlDB.MakeInParam("@LatestZhuanKeYear",       SqlDbType.Int,      4, info.LatestZhuanKeYear),
            };
            return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "ProvinceConfigAdd", prams).ToString(), -1));
        }
Esempio n. 6
0
        ///
        /// <summary>
        /// 获取前多少的值
        /// </summary>
        /// <param name="TopNumber">数量</param>
        /// <param name="PageSize">每页显示多少个</param>
        /// <param name="PageIndex">当前页码,最少为1</param>
        /// <returns>返回DataTable</returns>
        public static DataTable Join_ProjectPageListNew(string strWhere, int PageSize, int PageIndex)
        {
            StringBuilder sbSql = new StringBuilder();

            sbSql.Append("select p.*,pvr.ValueId,pvr.AttributeId from Join_Project as p left join Join_ProjectValRalition as pvr on p.ProjectId = pvr.ProjectId ");

            if (!string.IsNullOrEmpty(strWhere.Trim()))
            {
                sbSql.Append(" WHERE " + strWhere);
            }
            sbSql.Append(" ORDER BY p.ProjectId DESC");
            DataSet ds = new DataSet();

            ds = SqlDB.ExecuteDataset((PageIndex - 1) * PageSize, PageSize, strCon, CommandType.Text, sbSql.ToString());
            if (ds.Tables.Count > 0)
            {
                return(ds.Tables[0]);
            }
            return(new DataTable());
        }
Esempio n. 7
0
        /// <summary>
        /// 调用存储过程修改一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>更新成功返回ture,否则返回false</returns>
        public static bool edu_gradeEdit(Entity.edu_grade info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@id",           SqlDbType.Int,       4, info.id),
                SqlDB.MakeInParam("@name",         SqlDbType.NVarChar, 64, info.name),
                SqlDB.MakeInParam("@code",         SqlDbType.Char,      2, info.code),
                SqlDB.MakeInParam("@grade_index",  SqlDbType.Int,       4, info.grade_index),
                SqlDB.MakeInParam("@display_flag", SqlDbType.Int,       4, info.display_flag),
                SqlDB.MakeInParam("@section_id",   SqlDbType.Int,       4, info.section_id),
            };
            int intReturnValue = 0;

            intReturnValue = SqlDB.ExecuteNonQuery(strCon, CommandType.StoredProcedure, "edu_gradeEdit", prams);
            if (intReturnValue == 1)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 8
0
        /// <summary>
        /// 获取某一个实体
        /// </summary>
        /// <param name="Id">标识</param>
        /// <returns>返回Entity</returns>
        public static Entity.TiMuNeiRong TiMuNeiRongEntityGet(int Id)
        {
            Entity.TiMuNeiRong info = new Entity.TiMuNeiRong();
            DataTable          dt   = SqlDB.ExecuteDataset(strCon, CommandType.Text, "SELECT * FROM [TiMuNeiRong] WHERE Id = " + Id + ";").Tables[0];

            if (dt.Rows.Count > 0)
            {
                info.Id               = Basic.Utils.StrToInt(dt.Rows[0]["Id"].ToString(), 0);
                info.gid              = dt.Rows[0]["gid"].ToString();
                info.content          = dt.Rows[0]["content"].ToString();
                info.objective_answer = dt.Rows[0]["objective_answer"].ToString();
                info.answer           = dt.Rows[0]["answer"].ToString();
                info.subject_id       = Basic.Utils.StrToInt(dt.Rows[0]["subject_id"].ToString(), 0);
                return(info);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 9
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int TiMuSuoYinAdd(Entity.TiMuSuoYin info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@gid",                  SqlDbType.VarChar,   50, info.gid),
         SqlDB.MakeInParam("@zh_knowledge",         SqlDbType.NVarChar, 128, info.zh_knowledge),
         SqlDB.MakeInParam("@difficulty",           SqlDbType.Int,        4, info.difficulty),
         SqlDB.MakeInParam("@score",                SqlDbType.Int,        4, info.score),
         SqlDB.MakeInParam("@objective_flag",       SqlDbType.Int,        4, info.objective_flag),
         SqlDB.MakeInParam("@option_count",         SqlDbType.Int,        4, info.option_count),
         SqlDB.MakeInParam("@group_count",          SqlDbType.Int,        4, info.group_count),
         SqlDB.MakeInParam("@question_type",        SqlDbType.NVarChar,  50, info.question_type),
         SqlDB.MakeInParam("@subject_id",           SqlDbType.Int,        4, info.subject_id),
         SqlDB.MakeInParam("@grade_id",             SqlDbType.Int,        4, info.grade_id),
         SqlDB.MakeInParam("@section_id",           SqlDbType.Int,        4, info.section_id),
         SqlDB.MakeInParam("@edu_question_type_Id", SqlDbType.Int,        4, info.edu_question_type_Id),
         SqlDB.MakeInParam("@zhishidian_id",        SqlDbType.Int,        4, info.zhishidian_id),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "TiMuSuoYinAdd", prams).ToString(), -1));
 }
Esempio n. 10
0
        /// <summary>
        /// 调用存储过程修改一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>更新成功返回ture,否则返回false</returns>
        public static bool ShiJuan2TiMuEdit(Entity.ShiJuan2TiMu info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@OldId",       SqlDbType.Int,      4, info.OldId),
                SqlDB.MakeInParam("@exam_id",     SqlDbType.Int,      4, info.exam_id),
                SqlDB.MakeInParam("@question_id", SqlDbType.VarChar, 64, info.question_id),
                SqlDB.MakeInParam("@q_index",     SqlDbType.Int,      4, info.q_index),
                SqlDB.MakeInParam("@subject_id",  SqlDbType.Int,      4, info.subject_id),
                SqlDB.MakeInParam("@Id",          SqlDbType.Int,      4, info.Id),
            };
            int intReturnValue = 0;

            intReturnValue = SqlDB.ExecuteNonQuery(strCon, CommandType.StoredProcedure, "ShiJuan2TiMuEdit", prams);
            if (intReturnValue == 1)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 11
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int Join_ProfessionResultsAdd(Entity.Join_ProfessionResults info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@UserId",  SqlDbType.Int, 4, info.UserId),
         SqlDB.MakeInParam("@Group1",  SqlDbType.Int, 4, info.Group1),
         SqlDB.MakeInParam("@Group2",  SqlDbType.Int, 4, info.Group2),
         SqlDB.MakeInParam("@Group3",  SqlDbType.Int, 4, info.Group3),
         SqlDB.MakeInParam("@Group4",  SqlDbType.Int, 4, info.Group4),
         SqlDB.MakeInParam("@Group5",  SqlDbType.Int, 4, info.Group5),
         SqlDB.MakeInParam("@Group6",  SqlDbType.Int, 4, info.Group6),
         SqlDB.MakeInParam("@Group7",  SqlDbType.Int, 4, info.Group7),
         SqlDB.MakeInParam("@Group8",  SqlDbType.Int, 4, info.Group8),
         SqlDB.MakeInParam("@Group9",  SqlDbType.Int, 4, info.Group9),
         SqlDB.MakeInParam("@Group10", SqlDbType.Int, 4, info.Group10),
         SqlDB.MakeInParam("@Group11", SqlDbType.Int, 4, info.Group11),
         SqlDB.MakeInParam("@Group12", SqlDbType.Int, 4, info.Group12),
         SqlDB.MakeInParam("@Group13", SqlDbType.Int, 4, info.Group13),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "Join_ProfessionResultsAdd", prams).ToString(), -1));
 }
Esempio n. 12
0
        /// <summary>
        /// 调用存储过程修改一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>更新成功返回ture,否则返回false</returns>
        public static bool StudentShouCangEdit(Entity.StudentShouCang info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@Id",          SqlDbType.Int,        4, info.Id),
                SqlDB.MakeInParam("@StudentId",   SqlDbType.Int,        4, info.StudentId),
                SqlDB.MakeInParam("@SchoolId",    SqlDbType.Int,        4, info.SchoolId),
                SqlDB.MakeInParam("@ZhuanYeId",   SqlDbType.Int,        4, info.ZhuanYeId),
                SqlDB.MakeInParam("@SchoolName",  SqlDbType.NVarChar, 200, info.SchoolName),
                SqlDB.MakeInParam("@ZhuanYeName", SqlDbType.NVarChar, 200, info.ZhuanYeName),
                SqlDB.MakeInParam("@AddTime",     SqlDbType.DateTime,   8, info.AddTime),
            };
            int intReturnValue = 0;

            intReturnValue = SqlDB.ExecuteNonQuery(CommandType.StoredProcedure, "StudentShouCangEdit", prams);
            if (intReturnValue == 1)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 13
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int GaoKaoCardAdd(Entity.GaoKaoCard info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@KaHao",            SqlDbType.NVarChar,  50, info.KaHao),
         SqlDB.MakeInParam("@MiMa",             SqlDbType.NVarChar,  50, info.MiMa),
         SqlDB.MakeInParam("@StudentId",        SqlDbType.Int,        4, info.StudentId),
         SqlDB.MakeInParam("@ProvinceId",       SqlDbType.Int,        4, info.ProvinceId),
         SqlDB.MakeInParam("@Belong",           SqlDbType.Int,        4, info.Belong),
         SqlDB.MakeInParam("@DianId",           SqlDbType.Int,        4, info.DianId),
         SqlDB.MakeInParam("@CardLevel",        SqlDbType.Int,        4, info.CardLevel),
         SqlDB.MakeInParam("@IsPause",          SqlDbType.Int,        4, info.IsPause),
         //	SqlDB.MakeInParam("@RegisterDate", SqlDbType.DateTime, 8, info.RegisterDate),
         SqlDB.MakeInParam("@AllowChangeCount", SqlDbType.Int,        4, info.AllowChangeCount),
         SqlDB.MakeInParam("@HaveChangeCount",  SqlDbType.Int,        4, info.HaveChangeCount),
         SqlDB.MakeInParam("@EndTime",          SqlDbType.DateTime,   8, info.EndTime),
         SqlDB.MakeInParam("@Memo",             SqlDbType.NVarChar, 500, info.Memo),
         SqlDB.MakeInParam("@DingDanHao",       SqlDbType.NVarChar, 100, info.DingDanHao),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "GaoKaoCardAdd", prams).ToString(), -1));
 }
Esempio n. 14
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int StudentGaoKaoHistoryAdd(Entity.StudentGaoKaoHistory info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@StudentId",         SqlDbType.Int, 4, info.StudentId),
         SqlDB.MakeInParam("@FenShu",            SqlDbType.Int, 4, info.FenShu),
         SqlDB.MakeInParam("@FirstLevel",        SqlDbType.Int, 4, info.FirstLevel),
         SqlDB.MakeInParam("@SecondLevel",       SqlDbType.Int, 4, info.SecondLevel),
         SqlDB.MakeInParam("@PcFirst",           SqlDbType.Int, 4, info.PcFirst),
         SqlDB.MakeInParam("@PcSecond",          SqlDbType.Int, 4, info.PcSecond),
         SqlDB.MakeInParam("@PcThird",           SqlDbType.Int, 4, info.PcThird),
         SqlDB.MakeInParam("@PcZhuanKeFirst",    SqlDbType.Int, 4, info.PcZhuanKeFirst),
         SqlDB.MakeInParam("@PcZhuanKeSecond",   SqlDbType.Int, 4, info.PcZhuanKeSecond),
         SqlDB.MakeInParam("@IsSetUpFenShuXian", SqlDbType.Int, 4, info.IsSetUpFenShuXian),
         SqlDB.MakeInParam("@WeiCi",             SqlDbType.Int, 4, info.WeiCi),
         SqlDB.MakeInParam("@IsSetUpWeiCi",      SqlDbType.Int, 4, info.IsSetUpWeiCi),
         SqlDB.MakeInParam("@IsGaoKao",          SqlDbType.Int, 4, info.IsGaoKao),
         SqlDB.MakeInParam("@IsLatest",          SqlDbType.Int, 4, info.IsLatest),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "StudentGaoKaoHistoryAdd", prams).ToString(), -1));
 }
Esempio n. 15
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int Join_ZhongKeResultsAdd(Entity.Join_ZhongKeResults info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@UserId",     SqlDbType.Int,      4, info.UserId),
         SqlDB.MakeInParam("@BeiDong",    SqlDbType.Int,      4, info.BeiDong),
         SqlDB.MakeInParam("@YanXue",     SqlDbType.Int,      4, info.YanXue),
         SqlDB.MakeInParam("@XinXiCaiJi", SqlDbType.Int,      4, info.XinXiCaiJi),
         SqlDB.MakeInParam("@FangFa",     SqlDbType.Int,      4, info.FangFa),
         SqlDB.MakeInParam("@BiJiao",     SqlDbType.Int,      4, info.BiJiao),
         SqlDB.MakeInParam("@ZiJian",     SqlDbType.Int,      4, info.ZiJian),
         SqlDB.MakeInParam("@QuDao",      SqlDbType.Int,      4, info.QuDao),
         SqlDB.MakeInParam("@FenXi",      SqlDbType.Int,      4, info.FenXi),
         SqlDB.MakeInParam("@ZiKong",     SqlDbType.Int,      4, info.ZiKong),
         SqlDB.MakeInParam("@GouTong",    SqlDbType.Int,      4, info.GouTong),
         SqlDB.MakeInParam("@SiWei",      SqlDbType.Int,      4, info.SiWei),
         SqlDB.MakeInParam("@ChengDan",   SqlDbType.Int,      4, info.ChengDan),
         SqlDB.MakeInParam("@AddTime",    SqlDbType.DateTime, 8, info.AddTime),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "Join_ZhongKeResultsAdd", prams).ToString(), -1));
 }
Esempio n. 16
0
        public static Entity.FenShengYuanXiaoLuQu FenShengYuanXiaoLuQuAllEntityGet(int ProvinceId, int PiCi, int KeLei, int SchoolId, string strDataYear)
        {
            Entity.FenShengYuanXiaoLuQu info = new Entity.FenShengYuanXiaoLuQu();
            DataTable dt = SqlDB.ExecuteDataset(CommandType.Text, "SELECT * FROM [" + DAL.Common.GetYearTableName("FenShengYuanXiaoLuQu", "All") + "] WHERE DataYear = " + strDataYear + " AND ProvinceId = " + ProvinceId + " AND PiCi = " + PiCi + " AND KeLei = " + KeLei + " AND SchoolId = " + SchoolId).Tables[0];

            if (dt.Rows.Count > 0)
            {
                info.Id                 = Basic.Utils.StrToInt(dt.Rows[0]["Id"].ToString(), 0);
                info.DataYear           = Basic.Utils.StrToInt(dt.Rows[0]["DataYear"].ToString(), 0);
                info.ProvinceId         = Basic.Utils.StrToInt(dt.Rows[0]["ProvinceId"].ToString(), 0);
                info.ShengShi           = dt.Rows[0]["ShengShi"].ToString();
                info.CengCi             = Basic.Utils.StrToInt(dt.Rows[0]["CengCi"].ToString(), 0);
                info.PiCi               = Basic.Utils.StrToInt(dt.Rows[0]["PiCi"].ToString(), 0);
                info.PcLeiBie           = Basic.Utils.StrToInt(dt.Rows[0]["PcLeiBie"].ToString(), 0);
                info.KeLei              = Basic.Utils.StrToInt(dt.Rows[0]["KeLei"].ToString(), 0);
                info.KeLeiMingCheng     = dt.Rows[0]["KeLeiMingCheng"].ToString();
                info.SchoolId           = Basic.Utils.StrToInt(dt.Rows[0]["SchoolId"].ToString(), 0);
                info.SchoolProvinceId   = Basic.Utils.StrToInt(dt.Rows[0]["SchoolProvinceId"].ToString(), 0);
                info.YuanXiaoDaiMa      = dt.Rows[0]["YuanXiaoDaiMa"].ToString();
                info.YuanXiaoMingCheng  = dt.Rows[0]["YuanXiaoMingCheng"].ToString();
                info.ZuiGaoFen          = Basic.Utils.StrToInt(dt.Rows[0]["ZuiGaoFen"].ToString(), 0);
                info.PingJunFen         = Basic.Utils.StrToInt(dt.Rows[0]["PingJunFen"].ToString(), 0);
                info.ZuiDiFen           = Basic.Utils.StrToInt(dt.Rows[0]["ZuiDiFen"].ToString(), 0);
                info.ZuiDaWeiCi         = Basic.Utils.StrToInt(dt.Rows[0]["ZuiDaWeiCi"].ToString(), 0);
                info.PingJunWeiCi       = Basic.Utils.StrToInt(dt.Rows[0]["PingJunWeiCi"].ToString(), 0);
                info.ZuiXiaoWeiCi       = Basic.Utils.StrToInt(dt.Rows[0]["ZuiXiaoWeiCi"].ToString(), 0);
                info.PiCiXian           = Basic.Utils.StrToInt(dt.Rows[0]["PiCiXian"].ToString(), 0);
                info.PingJunXianCha     = Basic.Utils.StrToInt(dt.Rows[0]["PingJunXianCha"].ToString(), 0);
                info.JiHuaShu           = Basic.Utils.StrToInt(dt.Rows[0]["JiHuaShu"].ToString(), 0);
                info.TouDangBiLi        = Basic.Utils.StrToInt(dt.Rows[0]["TouDangBiLi"].ToString(), 0);
                info.TouChuShu          = Basic.Utils.StrToInt(dt.Rows[0]["TouChuShu"].ToString(), 0);
                info.LuQuShu            = Basic.Utils.StrToInt(dt.Rows[0]["LuQuShu"].ToString(), 0);
                info.TouChuZuiDiFen     = Basic.Utils.StrToInt(dt.Rows[0]["TouChuZuiDiFen"].ToString(), 0);
                info.TouChuZuiGaoFen    = Basic.Utils.StrToInt(dt.Rows[0]["TouChuZuiGaoFen"].ToString(), 0);
                info.TouChuZuiXiaoWeiCi = Basic.Utils.StrToInt(dt.Rows[0]["TouChuZuiXiaoWeiCi"].ToString(), 0);
                info.TouChuZuiDaWeiCi   = Basic.Utils.StrToInt(dt.Rows[0]["TouChuZuiDaWeiCi"].ToString(), 0);
                info.IsBuLu             = Basic.Utils.StrToInt(dt.Rows[0]["IsBuLu"].ToString(), 0);
            }
            return(info);
        }
Esempio n. 17
0
        public static Entity.GaoKaoCard GaoKaoCardEntityGetByKaHao(string strKaoHao, string strMiMa)
        {
            Entity.GaoKaoCard info = new Entity.GaoKaoCard();

            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@KaHao", SqlDbType.NVarChar, 500, strKaoHao),
                SqlDB.MakeInParam("@MiMa",  SqlDbType.NVarChar,  50, strMiMa),
            };
            DataTable dt = SqlDB.ExecuteDataset(CommandType.StoredProcedure, "GaoKaoCardEntityGet", prams).Tables[0];

            //DataTable dt = SqlDB.ExecuteDataset(CommandType.Text, "SELECT * FROM [GaoKaoCard] WHERE KaHao = '" + strKaoHao + "' AND MiMa = '" + strMiMa + "'").Tables[0];
            if (dt.Rows.Count > 0)
            {
                info.ID               = Basic.Utils.StrToInt(dt.Rows[0]["ID"].ToString(), 0);
                info.KaHao            = dt.Rows[0]["KaHao"].ToString();
                info.MiMa             = dt.Rows[0]["MiMa"].ToString();
                info.StudentId        = Basic.Utils.StrToInt(dt.Rows[0]["StudentId"].ToString(), 0);
                info.ProvinceId       = Basic.Utils.StrToInt(dt.Rows[0]["ProvinceId"].ToString(), 0);
                info.Belong           = Basic.Utils.StrToInt(dt.Rows[0]["Belong"].ToString(), 0);
                info.DianId           = Basic.Utils.StrToInt(dt.Rows[0]["DianId"].ToString(), 0);
                info.CardLevel        = Basic.Utils.StrToInt(dt.Rows[0]["CardLevel"].ToString(), 0);
                info.IsPause          = Basic.Utils.StrToInt(dt.Rows[0]["IsPause"].ToString(), 0);
                info.AllowChangeCount = Basic.Utils.StrToInt(dt.Rows[0]["AllowChangeCount"].ToString(), 0);
                info.HaveChangeCount  = Basic.Utils.StrToInt(dt.Rows[0]["HaveChangeCount"].ToString(), 0);
                info.Memo             = dt.Rows[0]["Memo"].ToString();
                info.DingDanHao       = dt.Rows[0]["DingDanHao"].ToString();

                info.EndTime      = Basic.TypeConverter.StrToDateTime(dt.Rows[0]["EndTime"].ToString());
                info.RegisterDate = Basic.TypeConverter.StrToDateTime(dt.Rows[0]["RegisterDate"].ToString());

                info.IsArt = Basic.Utils.StrToInt(dt.Rows[0]["IsArt"].ToString(), 0);

                return(info);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 18
0
        /// <summary>
        /// 调用存储过程修改一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>更新成功返回ture,否则返回false</returns>
        public static bool ShengKongXianArticleEdit(Entity.ShengKongXianArticle info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@Id",              SqlDbType.Int,        4, info.Id),
                SqlDB.MakeInParam("@Title",           SqlDbType.NVarChar, 200, info.Title),
                SqlDB.MakeInParam("@Metatitle",       SqlDbType.NVarChar, 500, info.Metatitle),
                SqlDB.MakeInParam("@Metakeywords",    SqlDbType.NVarChar, 500, info.Metakeywords),
                SqlDB.MakeInParam("@Metadescription", SqlDbType.NVarChar, 500, info.Metadescription),
                SqlDB.MakeInParam("@ProvinceId",      SqlDbType.Int,        4, info.ProvinceId),
                SqlDB.MakeInParam("@DataYear",        SqlDbType.Int,        4, info.DataYear),
                SqlDB.MakeInParam("@Content",         SqlDbType.NVarChar,   0, info.Content),
            };
            int intReturnValue = 0;

            intReturnValue = SqlDB.ExecuteNonQuery(CommandType.StoredProcedure, "ShengKongXianArticleEdit", prams);
            if (intReturnValue == 1)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 19
0
        public static DataTable ProvinceFenShuGetByWeiCiList(int WeiCi, int ProvinceId, int KeLei)
        {
            int       NowYear = DateTime.Now.Year;
            DataTable dt      = new DataTable();
            DataTable dtCopy  = new DataTable();

            for (int i = NowYear; i >= 2010; i--)
            {
                string strSql = "SELECT TOP 1 * FROM [ProvinceWeiCi] WHERE ProvinceId = " + ProvinceId + " AND KeLei = " + KeLei + " AND WeiCi <= " + WeiCi + "  AND [DataYear]=" + i + "  ORDER BY IsKaoshiyuan DESC,WeiCi DESC,PiCi asc ";
                dt = SqlDB.ExecuteDataset(CommandType.Text, strSql).Tables[0];
                if (dtCopy.Rows.Count == 0 && dt.Rows.Count > 0)
                {
                    dtCopy = dt.Copy();
                }
                else if (dt.Rows.Count > 0)
                {
                    dtCopy.ImportRow(dt.Rows[0]);
                }
            }

            return(dtCopy);
        }
Esempio n. 20
0
        /// <summary>
        /// 调用存储过程修改一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>更新成功返回ture,否则返回false</returns>
        public static bool AdvantageProfessionalEdit(Entity.AdvantageProfessional info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@Id",              SqlDbType.Int,       4, info.Id),
                SqlDB.MakeInParam("@SchoolId",        SqlDbType.Int,       4, info.SchoolId),
                SqlDB.MakeInParam("@ProfessionalId",  SqlDbType.Int,       4, info.ProfessionalId),
                SqlDB.MakeInParam("@IsTeSe",          SqlDbType.Int,       4, info.IsTeSe),
                SqlDB.MakeInParam("@TeSePiCi",        SqlDbType.NVarChar, 20, info.TeSePiCi),
                SqlDB.MakeInParam("@IsXueKePaiMing",  SqlDbType.Int,       4, info.IsXueKePaiMing),
                SqlDB.MakeInParam("@IsYiJiZhongDian", SqlDbType.Int,       4, info.IsYiJiZhongDian),
                SqlDB.MakeInParam("@IsErJiZhongDian", SqlDbType.Int,       4, info.IsErJiZhongDian),
            };
            int intReturnValue = 0;

            intReturnValue = SqlDB.ExecuteNonQuery(CommandType.StoredProcedure, "AdvantageProfessionalEdit", prams);
            if (intReturnValue == 1)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 21
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int DingDanAdd(Entity.DingDan info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@State",       SqlDbType.Int,        4, info.State),
         SqlDB.MakeInParam("@DingDanHao",  SqlDbType.NVarChar, 100, info.DingDanHao),
         SqlDB.MakeInParam("@Subject",     SqlDbType.NVarChar, 200, info.Subject),
         SqlDB.MakeInParam("@Body",        SqlDbType.NText,      0, info.Body),
         SqlDB.MakeInParam("@Count",       SqlDbType.Int,        4, info.Count),
         SqlDB.MakeInParam("@DanJia",      SqlDbType.Decimal,    0, info.DanJia),
         SqlDB.MakeInParam("@DingDanJinE", SqlDbType.Decimal,    0, info.DingDanJinE),
         SqlDB.MakeInParam("@CellName",    SqlDbType.NVarChar, 100, info.CellName),
         SqlDB.MakeInParam("@CellMobile",  SqlDbType.NVarChar,  50, info.CellMobile),
         SqlDB.MakeInParam("@AddTime",     SqlDbType.DateTime,   8, info.AddTime),
         SqlDB.MakeInParam("@Memo",        SqlDbType.NText,      0, info.Memo),
         SqlDB.MakeInParam("@ProvinceId",  SqlDbType.Int,        4, info.ProvinceId),
         SqlDB.MakeInParam("@WenLi",       SqlDbType.Int,        4, info.WenLi),
         SqlDB.MakeInParam("@Address",     SqlDbType.NVarChar, 200, info.Address),
         SqlDB.MakeInParam("@Category",    SqlDbType.Int,        4, info.Category),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "DingDanAdd", prams).ToString(), -1));
 }
Esempio n. 22
0
        /// <summary>
        /// 调用存储过程修改一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>更新成功返回ture,否则返回false</returns>
        public static bool YuSheChengJiEdit(Entity.YuSheChengJi info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@Id",        SqlDbType.Int, 4, info.Id),
                SqlDB.MakeInParam("@StudentId", SqlDbType.Int, 4, info.StudentId),
                SqlDB.MakeInParam("@KeLei",     SqlDbType.Int, 4, info.KeLei),
                SqlDB.MakeInParam("@FenShu",    SqlDbType.Int, 4, info.FenShu),
                SqlDB.MakeInParam("@PcFirst",   SqlDbType.Int, 4, info.PcFirst),
                SqlDB.MakeInParam("@PcSecond",  SqlDbType.Int, 4, info.PcSecond),
                SqlDB.MakeInParam("@PcThird",   SqlDbType.Int, 4, info.PcThird),
                SqlDB.MakeInParam("@PcZhuanKe", SqlDbType.Int, 4, info.PcZhuanKe),
            };
            int intReturnValue = 0;

            intReturnValue = SqlDB.ExecuteNonQuery(CommandType.StoredProcedure, "YuSheChengJiEdit", prams);
            if (intReturnValue == 1)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 23
0
        /// <summary>
        /// 获取某一个实体
        /// </summary>
        /// <param name="ProjectId">标识</param>
        /// <returns>返回Entity</returns>
        public static Entity.Join_Project Join_ProjectEntityGet(int ProjectId)
        {
            Entity.Join_Project info = new Entity.Join_Project();
            DataTable           dt   = SqlDB.ExecuteDataset(strCon, CommandType.Text, "SELECT * FROM [Join_Project] WHERE ProjectId = " + ProjectId + ";").Tables[0];

            if (dt.Rows.Count > 0)
            {
                info.ProjectId     = Basic.Utils.StrToInt(dt.Rows[0]["ProjectId"].ToString(), 0);
                info.ProjectName   = dt.Rows[0]["ProjectName"].ToString();
                info.Content       = dt.Rows[0]["Content"].ToString();
                info.TopPCid       = Basic.Utils.StrToInt(dt.Rows[0]["TopPCid"].ToString(), 0);
                info.PCidList      = dt.Rows[0]["PCidList"].ToString();
                info.PCid          = Basic.Utils.StrToInt(dt.Rows[0]["PCid"].ToString(), 0);
                info.ApplicantFile = dt.Rows[0]["ApplicantFile"].ToString();
                info.IsValid       = Basic.Utils.StrToInt(dt.Rows[0]["IsValid"].ToString(), 0);
                info.IsPause       = Basic.Utils.StrToInt(dt.Rows[0]["IsPause"].ToString(), 0);
                info.IsCheck       = Basic.Utils.StrToInt(dt.Rows[0]["IsCheck"].ToString(), 0);
                info.IsHot         = Basic.Utils.StrToInt(dt.Rows[0]["IsHot"].ToString(), 0);
                info.AddTime       = Basic.Utils.StrToDateTime(dt.Rows[0]["AddTime"].ToString());
            }
            return(info);
        }
Esempio n. 24
0
        /// <summary>
        /// 调用存储过程修改一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>更新成功返回ture,否则返回false</returns>
        public static bool Join_EvaluationUserEdit(Entity.Join_EvaluationUser info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@EvaluationUserId",       SqlDbType.Int,       4, info.EvaluationUserId),
                SqlDB.MakeInParam("@EvaluationUserName",     SqlDbType.NVarChar, 20, info.EvaluationUserName),
                SqlDB.MakeInParam("@EvaluationUserSex",      SqlDbType.Int,       4, info.EvaluationUserSex),
                SqlDB.MakeInParam("@EvaluationUserBirthday", SqlDbType.NVarChar, 50, info.EvaluationUserBirthday),
                SqlDB.MakeInParam("@EvaluationUserGrade",    SqlDbType.NVarChar, 50, info.EvaluationUserGrade),
                SqlDB.MakeInParam("@EvaluationUserMail",     SqlDbType.NVarChar, 50, info.EvaluationUserMail),
                SqlDB.MakeInParam("@EvaluationUserTel",      SqlDbType.NVarChar, 18, info.EvaluationUserTel),
                SqlDB.MakeInParam("@EvaluationUserPhone",    SqlDbType.NVarChar, 11, info.EvaluationUserPhone),
            };
            int intReturnValue = 0;

            intReturnValue = SqlDB.ExecuteNonQuery(strCon, CommandType.StoredProcedure, "Join_EvaluationUserEdit", prams);
            if (intReturnValue == 1)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 25
0
        /// <summary>
        /// 调用存储过程修改一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>更新成功返回ture,否则返回false</returns>
        public static bool Join_HollandResultsEdit(Entity.Join_HollandResults info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@HollandResultsId", SqlDbType.Int, 4, info.HollandResultsId),
                SqlDB.MakeInParam("@UserId",           SqlDbType.Int, 4, info.UserId),
                SqlDB.MakeInParam("@Reality",          SqlDbType.Int, 4, info.Reality),
                SqlDB.MakeInParam("@Study",            SqlDbType.Int, 4, info.Study),
                SqlDB.MakeInParam("@Art",              SqlDbType.Int, 4, info.Art),
                SqlDB.MakeInParam("@Society",          SqlDbType.Int, 4, info.Society),
                SqlDB.MakeInParam("@Business",         SqlDbType.Int, 4, info.Business),
                SqlDB.MakeInParam("@Tradition",        SqlDbType.Int, 4, info.Tradition),
            };
            int intReturnValue = 0;

            intReturnValue = SqlDB.ExecuteNonQuery(strCon, CommandType.StoredProcedure, "Join_HollandResultsEdit", prams);
            if (intReturnValue == 1)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 26
0
        /// <summary>
        /// 调用存储过程修改一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>更新成功返回ture,否则返回false</returns>
        public static bool ShiPinEdit(Entity.ShiPin info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@Id",       SqlDbType.Int,        4, info.Id),
                SqlDB.MakeInParam("@Title",    SqlDbType.NVarChar, 200, info.Title),
                SqlDB.MakeInParam("@Content",  SqlDbType.NText,      0, info.Content),
                SqlDB.MakeInParam("@Video",    SqlDbType.NText,      0, info.Video),
                SqlDB.MakeInParam("@TypeName", SqlDbType.NVarChar, 100, info.TypeName),
                SqlDB.MakeInParam("@TypeId",   SqlDbType.Int,        4, info.TypeId),
                SqlDB.MakeInParam("@AddTime",  SqlDbType.DateTime,   8, info.AddTime),
                SqlDB.MakeInParam("@IsPause",  SqlDbType.Int,        4, info.IsPause),
            };
            int intReturnValue = 0;

            intReturnValue = SqlDB.ExecuteNonQuery(CommandType.StoredProcedure, "ShiPinEdit", prams);
            if (intReturnValue == 1)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 27
0
        /// <summary>
        /// 获取某一个实体
        /// </summary>
        /// <param name="Id">标识</param>
        /// <returns>返回Entity</returns>
        public static Entity.ShiPin ShiPinEntityGet(int Id)
        {
            Entity.ShiPin info = new Entity.ShiPin();
            DataTable     dt   = SqlDB.ExecuteDataset(CommandType.Text, "SELECT * FROM [ShiPin] WHERE Id = " + Id + ";").Tables[0];

            if (dt.Rows.Count > 0)
            {
                info.Id       = Basic.Utils.StrToInt(dt.Rows[0]["Id"].ToString(), 0);
                info.Title    = dt.Rows[0]["Title"].ToString();
                info.Content  = dt.Rows[0]["Content"].ToString();
                info.Video    = dt.Rows[0]["Video"].ToString();
                info.TypeName = dt.Rows[0]["TypeName"].ToString();
                info.TypeId   = Basic.Utils.StrToInt(dt.Rows[0]["TypeId"].ToString(), 0);
                info.IsPause  = Basic.Utils.StrToInt(dt.Rows[0]["IsPause"].ToString(), 0);
                info.AddTime  = Basic.Utils.StrToDateTime(dt.Rows[0]["AddTime"].ToString());
                return(info);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 28
0
        /// <summary>
        /// 获取某一个实体
        /// </summary>
        /// <param name="Id">标识</param>
        /// <returns>返回Entity</returns>
        public static Entity.FenShengZhuanYeLuQu FenShengZhuanYeLuQuEntityGet(int Id, string strDataYear)
        {
            Entity.FenShengZhuanYeLuQu info = new Entity.FenShengZhuanYeLuQu();
            DataTable dt = SqlDB.ExecuteDataset(CommandType.Text, "SELECT * FROM [" + DAL.Common.GetYearTableName("FenShengZhuanYeLuQu", strDataYear) + "] WHERE Id = " + Id + ";").Tables[0];

            if (dt.Rows.Count > 0)
            {
                info.Id                = Basic.Utils.StrToInt(dt.Rows[0]["Id"].ToString(), 0);
                info.DataYear          = Basic.Utils.StrToInt(dt.Rows[0]["DataYear"].ToString(), 0);
                info.ProvinceId        = Basic.Utils.StrToInt(dt.Rows[0]["ProvinceId"].ToString(), 0);
                info.ShengShi          = dt.Rows[0]["ShengShi"].ToString();
                info.CengCi            = Basic.Utils.StrToInt(dt.Rows[0]["CengCi"].ToString(), 0);
                info.PiCi              = Basic.Utils.StrToInt(dt.Rows[0]["PiCi"].ToString(), 0);
                info.PcLeiBie          = Basic.Utils.StrToInt(dt.Rows[0]["PcLeiBie"].ToString(), 0);
                info.KeLei             = Basic.Utils.StrToInt(dt.Rows[0]["KeLei"].ToString(), 0);
                info.KeLeiDaiMa        = dt.Rows[0]["KeLeiDaiMa"].ToString();
                info.KeLeiMingCheng    = dt.Rows[0]["KeLeiMingCheng"].ToString();
                info.SchoolId          = Basic.Utils.StrToInt(dt.Rows[0]["SchoolId"].ToString(), 0);
                info.SchoolProvinceId  = Basic.Utils.StrToInt(dt.Rows[0]["SchoolProvinceId"].ToString(), 0);
                info.YuanXiaoDaiMa     = dt.Rows[0]["YuanXiaoDaiMa"].ToString();
                info.YuanXiaoMingCheng = dt.Rows[0]["YuanXiaoMingCheng"].ToString();
                info.ZyId              = Basic.Utils.StrToInt(dt.Rows[0]["ZyId"].ToString(), 0);
                info.ZhuanYeDaiMa      = dt.Rows[0]["ZhuanYeDaiMa"].ToString();
                info.ZhuanYeMingCheng  = dt.Rows[0]["ZhuanYeMingCheng"].ToString();
                info.ZyZuiGaoFen       = Basic.Utils.StrToInt(dt.Rows[0]["ZyZuiGaoFen"].ToString(), 0);
                info.ZyPingJunFen      = Basic.Utils.StrToInt(dt.Rows[0]["ZyPingJunFen"].ToString(), 0);
                info.ZyPiCiXian        = Basic.Utils.StrToInt(dt.Rows[0]["ZyPiCiXian"].ToString(), 0);
                info.ZyPingJunXianCha  = Basic.Utils.StrToInt(dt.Rows[0]["ZyPingJunXianCha"].ToString(), 0);
                info.ZyZuiDiFen        = Basic.Utils.StrToInt(dt.Rows[0]["ZyZuiDiFen"].ToString(), 0);
                info.ZyZuiDaWeiCi      = Basic.Utils.StrToInt(dt.Rows[0]["ZyZuiDaWeiCi"].ToString(), 0);
                info.ZyPingJunWeiCi    = Basic.Utils.StrToInt(dt.Rows[0]["ZyPingJunWeiCi"].ToString(), 0);
                info.ZyZuiXiaoWeiCi    = Basic.Utils.StrToInt(dt.Rows[0]["ZyZuiXiaoWeiCi"].ToString(), 0);
                info.ZYLuQuShu         = Basic.Utils.StrToInt(dt.Rows[0]["ZYLuQuShu"].ToString(), 0);
                info.ZyProvinceCount   = Basic.Utils.StrToInt(dt.Rows[0]["ZyProvinceCount"].ToString(), 0);
                info.ZyCountryCount    = Basic.Utils.StrToInt(dt.Rows[0]["ZyCountryCount"].ToString(), 0);
            }
            return(info);
        }
Esempio n. 29
0
        /// <summary>
        /// 获取某一个实体
        /// </summary>
        /// <param name="Id">标识</param>
        /// <returns>返回Entity</returns>
        public static Entity.ProvinceConfig ProvinceConfigEntityGet(int ProvinceId)
        {
            Entity.ProvinceConfig info = new Entity.ProvinceConfig();
            DataTable             dt   = SqlDB.ExecuteDataset(CommandType.Text, "SELECT * FROM [ProvinceConfig] WHERE ProvinceId = " + ProvinceId + ";").Tables[0];

            if (dt != null && dt.Rows.Count > 0)
            {
                info.Id                      = Basic.Utils.StrToInt(dt.Rows[0]["Id"].ToString(), 0);
                info.ProvinceId              = Basic.Utils.StrToInt(dt.Rows[0]["ProvinceId"].ToString(), 0);
                info.HasTiQianPi             = Basic.Utils.StrToInt(dt.Rows[0]["HasTiQianPi"].ToString(), 0);
                info.HasZhuanKe              = Basic.Utils.StrToInt(dt.Rows[0]["HasZhuanKe"].ToString(), 0);
                info.HasZhuanKeZhuanYe       = Basic.Utils.StrToInt(dt.Rows[0]["HasZhuanKeZhuanYe"].ToString(), 0);
                info.OwnTable                = Basic.Utils.StrToInt(dt.Rows[0]["OwnTable"].ToString(), 0);
                info.LatestProvinceWeiCiYear = Basic.Utils.StrToInt(dt.Rows[0]["LatestProvinceWeiCiYear"].ToString(), 0);
                info.LatestBenKeYear         = Basic.Utils.StrToInt(dt.Rows[0]["LatestBenKeYear"].ToString(), 2013);
                info.LatestBenKeZhuanYeYear  = Basic.Utils.StrToInt(dt.Rows[0]["LatestBenKeZhuanYeYear"].ToString(), 2013);
                info.LatestZhuanKeYear       = Basic.Utils.StrToInt(dt.Rows[0]["LatestZhuanKeYear"].ToString(), 0);
            }
            else
            {
                info.Id                      = 0;
                info.ProvinceId              = ProvinceId;
                info.HasTiQianPi             = 0;
                info.HasZhuanKe              = 0;
                info.HasZhuanKeZhuanYe       = 0;
                info.OwnTable                = 0;
                info.LatestProvinceWeiCiYear = 2014;
                info.LatestBenKeYear         = 2013;
                info.LatestBenKeZhuanYeYear  = 2013;
                info.LatestZhuanKeYear       = 0;

                if (ProvinceId == 1 || ProvinceId == 9 || ProvinceId == 11 || ProvinceId == 13 || ProvinceId == 21 || ProvinceId == 26 || ProvinceId == 27 || ProvinceId == 28 || ProvinceId == 29 || ProvinceId == 31 || ProvinceId == 32)
                {
                    info.LatestProvinceWeiCiYear = 2013;
                }
            }
            return(info);
        }
Esempio n. 30
0
        /// <summary>
        /// 调用存储过程修改一个
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>更新成功返回ture,否则返回false</returns>
        public static bool SchoolArticleEdit(Entity.SchoolArticle info)
        {
            SqlParameter[] prams =
            {
                SqlDB.MakeInParam("@Id",              SqlDbType.Int,         4, info.Id),
                SqlDB.MakeInParam("@SchoolId",        SqlDbType.Int,         4, info.SchoolId),
                SqlDB.MakeInParam("@CategoryId",      SqlDbType.Int,         4, info.CategoryId),
                SqlDB.MakeInParam("@Icon",            SqlDbType.NVarChar,  500, info.Icon),
                SqlDB.MakeInParam("@Title",           SqlDbType.NVarChar,  200, info.Title),
                SqlDB.MakeInParam("@ShortTitle",      SqlDbType.NVarChar,  200, info.ShortTitle),
                SqlDB.MakeInParam("@MetaTitle",       SqlDbType.NVarChar,  200, info.MetaTitle),
                SqlDB.MakeInParam("@MetaKeyWords",    SqlDbType.NVarChar,  200, info.MetaKeyWords),
                SqlDB.MakeInParam("@MetaDescription", SqlDbType.NVarChar,  300, info.MetaDescription),
                SqlDB.MakeInParam("@Summary",         SqlDbType.NVarChar, 2000, info.Summary),
                SqlDB.MakeInParam("@Content",         SqlDbType.NVarChar,    0, info.Content),
                SqlDB.MakeInParam("@PublishTime",     SqlDbType.DateTime,    8, info.PublishTime),
                SqlDB.MakeInParam("@IsTuiJian",       SqlDbType.Int,         4, info.IsTuiJian),
                SqlDB.MakeInParam("@IsNew",           SqlDbType.Int,         4, info.IsNew),
                SqlDB.MakeInParam("@IsZhiDing",       SqlDbType.Int,         4, info.IsZhiDing),
                SqlDB.MakeInParam("@ZhiDingTime",     SqlDbType.DateTime,    8, info.ZhiDingTime),
                SqlDB.MakeInParam("@AddTime",         SqlDbType.DateTime,    8, info.AddTime),
                SqlDB.MakeInParam("@AddWid",          SqlDbType.Int,         4, info.AddWid),
                SqlDB.MakeInParam("@IsCheck",         SqlDbType.Int,         4, info.IsCheck),
                SqlDB.MakeInParam("@CheckTime",       SqlDbType.DateTime,    8, info.CheckTime),
                SqlDB.MakeInParam("@CheckWid",        SqlDbType.Int,         4, info.CheckWid),
                SqlDB.MakeInParam("@ClickNum",        SqlDbType.Int,         4, info.ClickNum),
                SqlDB.MakeInParam("@IsPause",         SqlDbType.Int,         4, info.IsPause),
                SqlDB.MakeInParam("@Year",            SqlDbType.Int,         4, info.Year),
            };
            int intReturnValue = 0;

            intReturnValue = SqlDB.ExecuteNonQuery(CommandType.StoredProcedure, "SchoolArticleEdit", prams);
            if (intReturnValue == 1)
            {
                return(true);
            }
            return(false);
        }