Ejemplo n.º 1
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int BenKeFenShuAdd(Entity.BenKeFenShu info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@DataYear",          SqlDbType.Int,       4, info.DataYear),
         SqlDB.MakeInParam("@KaoShengHao",       SqlDbType.VarChar,  50, info.KaoShengHao),
         SqlDB.MakeInParam("@ccdm",              SqlDbType.VarChar,  50, info.Ccdm),
         SqlDB.MakeInParam("@KeLei",             SqlDbType.Int,       4, info.KeLei),
         SqlDB.MakeInParam("@KeLeiDaiMa",        SqlDbType.VarChar,  50, info.KeLeiDaiMa),
         SqlDB.MakeInParam("@SchoolId",          SqlDbType.Int,       4, info.SchoolId),
         SqlDB.MakeInParam("@YuanXiaoDaiMa",     SqlDbType.VarChar,  50, info.YuanXiaoDaiMa),
         SqlDB.MakeInParam("@YuanXiaoMingCheng", SqlDbType.VarChar, 500, info.YuanXiaoMingCheng),
         SqlDB.MakeInParam("@ZyId",              SqlDbType.Int,       4, info.ZyId),
         SqlDB.MakeInParam("@ZhuanYeDaiMa",      SqlDbType.VarChar,  50, info.ZhuanYeDaiMa),
         SqlDB.MakeInParam("@ZhuanYeMingCheng",  SqlDbType.VarChar, 500, info.ZhuanYeMingCheng),
         SqlDB.MakeInParam("@LuQuPiCi",          SqlDbType.VarChar,  50, info.LuQuPiCi),
         SqlDB.MakeInParam("@PiCi",              SqlDbType.Int,       4, info.PiCi),
         SqlDB.MakeInParam("@PcLeiBie",          SqlDbType.Int,       4, info.PcLeiBie),
         SqlDB.MakeInParam("@FenShu",            SqlDbType.Int,       4, info.FenShu),
         SqlDB.MakeInParam("@WeiCi",             SqlDbType.Int,       4, info.WeiCi),
         SqlDB.MakeInParam("@PiCiXian",          SqlDbType.Int,       4, info.PiCiXian),
         SqlDB.MakeInParam("@IsAbove",           SqlDbType.Int,       4, info.IsAbove),
         SqlDB.MakeInParam("@ShengShi",          SqlDbType.VarChar,  10, info.ShengShi),
         SqlDB.MakeInParam("@ShengShiDaiMa",     SqlDbType.VarChar,  10, info.ShengShiDaiMa),
         SqlDB.MakeInParam("@ProvinceId",        SqlDbType.Int,       4, info.ProvinceId),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "BenKeFenShuAdd", prams).ToString(), -1));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int FenShengZhuanYeLuQuAdd(Entity.FenShengZhuanYeLuQu info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@DataYear",          SqlDbType.Int,       4, info.DataYear),
         SqlDB.MakeInParam("@ProvinceId",        SqlDbType.Int,       4, info.ProvinceId),
         SqlDB.MakeInParam("@ShengShi",          SqlDbType.NVarChar, 15, info.ShengShi),
         SqlDB.MakeInParam("@CengCi",            SqlDbType.Int,       4, info.CengCi),
         SqlDB.MakeInParam("@PiCi",              SqlDbType.Int,       4, info.PiCi),
         SqlDB.MakeInParam("@PcLeiBie",          SqlDbType.Int,       4, info.PcLeiBie),
         SqlDB.MakeInParam("@KeLei",             SqlDbType.Int,       4, info.KeLei),
         SqlDB.MakeInParam("@KeLeiDaiMa",        SqlDbType.Char,      1, info.KeLeiDaiMa),
         SqlDB.MakeInParam("@KeLeiMingCheng",    SqlDbType.NVarChar, 50, info.KeLeiMingCheng),
         SqlDB.MakeInParam("@SchoolId",          SqlDbType.Int,       4, info.SchoolId),
         SqlDB.MakeInParam("@SchoolProvinceId",  SqlDbType.Int,       4, info.SchoolProvinceId),
         SqlDB.MakeInParam("@YuanXiaoDaiMa",     SqlDbType.Char,      5, info.YuanXiaoDaiMa),
         SqlDB.MakeInParam("@YuanXiaoMingCheng", SqlDbType.NVarChar, 64, info.YuanXiaoMingCheng),
         SqlDB.MakeInParam("@ZyId",              SqlDbType.Int,       4, info.ZyId),
         SqlDB.MakeInParam("@ZhuanYeDaiMa",      SqlDbType.Char,     50, info.ZhuanYeDaiMa),
         SqlDB.MakeInParam("@ZhuanYeMingCheng",  SqlDbType.NVarChar, 50, info.ZhuanYeMingCheng),
         SqlDB.MakeInParam("@ZyZuiGaoFen",       SqlDbType.Int,       4, info.ZyZuiGaoFen),
         SqlDB.MakeInParam("@ZyPingJunFen",      SqlDbType.Int,       4, info.ZyPingJunFen),
         SqlDB.MakeInParam("@ZyPiCiXian",        SqlDbType.Int,       4, info.ZyPiCiXian),
         SqlDB.MakeInParam("@ZyPingJunXianCha",  SqlDbType.Int,       4, info.ZyPingJunXianCha),
         SqlDB.MakeInParam("@ZyZuiDiFen",        SqlDbType.Int,       4, info.ZyZuiDiFen),
         SqlDB.MakeInParam("@ZyZuiDaWeiCi",      SqlDbType.Int,       4, info.ZyZuiDaWeiCi),
         SqlDB.MakeInParam("@ZyPingJunWeiCi",    SqlDbType.Int,       4, info.ZyPingJunWeiCi),
         SqlDB.MakeInParam("@ZyZuiXiaoWeiCi",    SqlDbType.Int,       4, info.ZyZuiXiaoWeiCi),
         SqlDB.MakeInParam("@ZYLuQuShu",         SqlDbType.Int,       4, info.ZYLuQuShu),
         SqlDB.MakeInParam("@ZyProvinceCount",   SqlDbType.Int,       4, info.ZyProvinceCount),
         SqlDB.MakeInParam("@ZyCountryCount",    SqlDbType.Int,       4, info.ZyCountryCount),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "FenShengZhuanYeLuQuAdd", prams).ToString(), -1));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int SchoolArticleAdd(Entity.SchoolArticle info)
 {
     SqlParameter[] prams =
     {
         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),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "SchoolArticleAdd", prams).ToString(), -1));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int Join_TestAdd(Entity.Join_Test info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@TestTitle", SqlDbType.Int, 4, info.TestTitle),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "Join_TestAdd", prams).ToString(), -1));
 }
Ejemplo n.º 5
0
        /// <summary>
        /// 获取该条件下的加盟商的总的数量
        /// </summary>
        /// <param name="strWhere">条件,可以为空</param>
        /// <returns>如果没有就返回0</returns>
        public static int Join_ProjectCountForDaiLiFenPei(int Did, int PCid)
        {
            String strSQL = "SELECT count(*) FROM [Join_Project] AS P,[Join_ProjectRelated] AS PR,[Join_JiaMengDianProject] AS JMDP WHERE P.ProjectId = PR.Pid AND PR.IsValid = 1 AND P.IsValid = 1 AND P.IsPause = 0 AND P.PCid = " + PCid + "AND P.ProjectId = JMDP.Pid AND JMDP.Did = " + Did;

            //strSQL = strSQL + " AND PR.Pid NOT IN (SELECT * FROM [Join_JiaMengDianProject] WHERE Did = " + Did + ")";
            //strSQL = strSQL + "  ORDER BY PR.Pid DESC";
            return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.Text, strSQL).ToString(), 0));
        }
Ejemplo n.º 6
0
        public static int ShiJuanCount(string TablePre)
        {
            string strSql = "select count(*) from " + TablePre + "_exam_examination,edu_subject,edu_grade,area_province where subject_id = edu_subject.id and grade_id = edu_grade.id and province_id = area_province.id";

            return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.Text, strSql).ToString(), 0));

            //strSql = "select * from dl_exam_examination,edu_subject,edu_grade,area_province where subject_id = edu_subject.id and grade_id = edu_grade.id and province_id = area_province.id";
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int edu_question_typeAdd(Entity.edu_question_type info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@subject_id", SqlDbType.Int,       4, info.subject_id),
         SqlDB.MakeInParam("@type_name",  SqlDbType.NVarChar, 64, info.type_name),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "edu_question_typeAdd", prams).ToString(), -1));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int zhishidianAdd(Entity.zhishidian info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@subject_id", SqlDbType.Int,        4, info.subject_id),
         SqlDB.MakeInParam("@name",       SqlDbType.NVarChar, 200, info.name),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "zhishidianAdd", prams).ToString(), -1));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int XiangQingAdd(Entity.XiangQing info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@LoginId",          SqlDbType.Int, 4, info.LoginId),
         SqlDB.MakeInParam("@YKStudentXinXiId", SqlDbType.Int, 4, info.YKStudentXinXiId),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "XiangQingAdd", prams).ToString(), -1));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int area_provinceAdd(Entity.area_province info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@Name",       SqlDbType.NVarChar, 32, info.Name),
         SqlDB.MakeInParam("@country_id", SqlDbType.VarChar,   6, info.country_id),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "area_provinceAdd", prams).ToString(), -1));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int ZhiShiDianRelationAdd(Entity.ZhiShiDianRelation info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@ZhenTiZSDId", SqlDbType.Int, 4, info.ZhenTiZSDId),
         SqlDB.MakeInParam("@KMZSDId",     SqlDbType.Int, 4, info.KMZSDId),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "ZhiShiDianRelationAdd", prams).ToString(), -1));
 }
Ejemplo n.º 12
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int Join_Ability_MajorAdd(Entity.Join_Ability_Major info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@MajorName", SqlDbType.Int, 4, info.MajorName),
         SqlDB.MakeInParam("@GradeList", SqlDbType.Int, 4, info.GradeList),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "Join_Ability_MajorAdd", prams).ToString(), -1));
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int ZhiYeZhuanYeAdd(Entity.ZhiYeZhuanYe info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@ZhiYeId",        SqlDbType.Int, 4, info.ZhiYeId),
         SqlDB.MakeInParam("@ProfessionalId", SqlDbType.Int, 4, info.ProfessionalId),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "ZhiYeZhuanYeAdd", prams).ToString(), -1));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int SchoolCategoryAdd(Entity.SchoolCategory info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@CategoryName", SqlDbType.NVarChar, 200, info.CategoryName),
         SqlDB.MakeInParam("@Sort",         SqlDbType.Int,        4, info.Sort),
         SqlDB.MakeInParam("@IsPause",      SqlDbType.Int,        4, info.IsPause),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "SchoolCategoryAdd", prams).ToString(), -1));
 }
Ejemplo n.º 15
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int Join_ResultsAdd(Entity.Join_Results info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@UserId",         SqlDbType.Int, 4, info.UserId),
         SqlDB.MakeInParam("@ResultsContent", SqlDbType.Int, 4, info.ResultsContent),
         SqlDB.MakeInParam("@AddTime",        SqlDbType.Int, 4, info.AddTime),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "Join_ResultsAdd", prams).ToString(), -1));
 }
Ejemplo n.º 16
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int Join_TestWLResultsAdd(Entity.Join_TestWLResults info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@UserId", SqlDbType.Int, 4, info.UserId),
         SqlDB.MakeInParam("@WK",     SqlDbType.Int, 4, info.WK),
         SqlDB.MakeInParam("@LK",     SqlDbType.Int, 4, info.LK)
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "Join_TestWLResultsAdd", prams).ToString(), -1));
 }
Ejemplo n.º 17
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int edu_subjectAdd(Entity.edu_subject info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@name",          SqlDbType.NVarChar, 64, info.name),
         SqlDB.MakeInParam("@subject_code",  SqlDbType.Char,      2, info.subject_code),
         SqlDB.MakeInParam("@subject_index", SqlDbType.Int,       4, info.subject_index),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "edu_subjectAdd", prams).ToString(), -1));
 }
Ejemplo n.º 18
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int zhishidian2timusuoyinAdd(Entity.zhishidian2timusuoyin info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@ZhiShiDianId", SqlDbType.Int,       4, info.ZhiShiDianId),
         SqlDB.MakeInParam("@TiMuSuoYinId", SqlDbType.Int,       4, info.TiMuSuoYinId),
         SqlDB.MakeInParam("@gid",          SqlDbType.NVarChar, 50, info.gid),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "zhishidian2timusuoyinAdd", prams).ToString(), -1));
 }
Ejemplo n.º 19
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int Join_AbilityTestAdd(Entity.Join_AbilityTest info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@AbilityNumber", SqlDbType.Int,        4, info.AbilityNumber),
         SqlDB.MakeInParam("@AbilityTitle",  SqlDbType.NVarChar, 500, info.AbilityTitle),
         SqlDB.MakeInParam("@GroupNumber",   SqlDbType.Int,        4, info.GroupNumber),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "Join_AbilityTestAdd", prams).ToString(), -1));
 }
Ejemplo n.º 20
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int Join_MbitAnswerAdd(Entity.Join_MbitAnswer info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@TestId",        SqlDbType.Int,       4, info.TestId),
         SqlDB.MakeInParam("@AnswerContent", SqlDbType.NVarChar, 50, info.AnswerContent),
         SqlDB.MakeInParam("@Opetion",       SqlDbType.NVarChar, 50, info.Opetion),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "Join_MbitAnswerAdd", prams).ToString(), -1));
 }
Ejemplo n.º 21
0
        /// <summary>
        /// 获取该条件下的总的数量
        /// </summary>
        /// <param name="strWhere">条件,可以为空</param>
        /// <returns>如果没有就返回0</returns>
        public static int Join_ProjectCount(string strWhere)
        {
            StringBuilder sbSql = new StringBuilder();

            sbSql.Append("SELECT count(*) FROM Join_Project as p left join Join_ProjectCategory as pc on p.PCid = pc.ProjectCategoryId left join Join_ProjectRelated as pr on p.ProjectId = pr.Pid WHERE pr.PPid > 0 and pr.IsValid = 1 ");
            if (!string.IsNullOrEmpty(strWhere.Trim()))
            {
                sbSql.Append(" AND " + strWhere);
            }
            return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.Text, sbSql.ToString()).ToString(), 0));
        }
Ejemplo n.º 22
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int NoticeAdd(Entity.Notice info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@ProvinceId", SqlDbType.Int,        4, info.ProvinceId),
         SqlDB.MakeInParam("@Content",    SqlDbType.NVarChar, 200, info.Content),
         SqlDB.MakeInParam("@AddWid",     SqlDbType.Int,        4, info.AddWid),
         SqlDB.MakeInParam("@AddTime",    SqlDbType.DateTime,   8, info.AddTime),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "NoticeAdd", prams).ToString(), -1));
 }
Ejemplo n.º 23
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int Join_ProjectAdd(Entity.Join_Project info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@ProjectName",   SqlDbType.NVarChar, 1000, info.ProjectName),
         SqlDB.MakeInParam("@Content",       SqlDbType.NText,       0, info.Content),
         SqlDB.MakeInParam("@PCid",          SqlDbType.Int,         4, info.PCid),
         SqlDB.MakeInParam("@ApplicantFile", SqlDbType.NVarChar,  500, info.ApplicantFile),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "Join_ProjectAdd", prams).ToString(), -1));
 }
Ejemplo n.º 24
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int ProvinceAdd(Entity.Province info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@ProvinceName",   SqlDbType.NVarChar, 50, info.ProvinceName),
         SqlDB.MakeInParam("@ProvincePinYin", SqlDbType.NVarChar, 50, info.ProvincePinYin),
         SqlDB.MakeInParam("@ProvinceCode",   SqlDbType.NVarChar, 50, info.ProvinceCode),
         SqlDB.MakeInParam("@AdminCode",      SqlDbType.NVarChar, 50, info.AdminCode),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "ProvinceAdd", prams).ToString(), -1));
 }
Ejemplo n.º 25
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int ProfessionalZhiYeRelationAdd(Entity.ProfessionalZhiYeRelation info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@ZhiYeId",          SqlDbType.Int,        4, info.ZhiYeId),
         SqlDB.MakeInParam("@ProfessionalId",   SqlDbType.Int,        4, info.ProfessionalId),
         SqlDB.MakeInParam("@ProfessionalCode", SqlDbType.NVarChar,  50, info.ProfessionalCode),
         SqlDB.MakeInParam("@ProfessionalName", SqlDbType.NVarChar, 150, info.ProfessionalName),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "ProfessionalZhiYeRelationAdd", prams).ToString(), -1));
 }
Ejemplo n.º 26
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int SchoolDisciplinesAdd(Entity.SchoolDisciplines info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@SchoolId",          SqlDbType.Int, 4, info.SchoolId),
         SqlDB.MakeInParam("@DisciplinesId",     SqlDbType.Int, 4, info.DisciplinesId),
         SqlDB.MakeInParam("@ProfessionalCount", SqlDbType.Int, 4, info.ProfessionalCount),
         SqlDB.MakeInParam("@IsPause",           SqlDbType.Int, 4, info.IsPause),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "SchoolDisciplinesAdd", prams).ToString(), -1));
 }
Ejemplo n.º 27
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int Join_ZhongKeTestAdd(Entity.Join_ZhongKeTest info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@TestNumber", SqlDbType.Int,        4, info.TestNumber),
         SqlDB.MakeInParam("@TestTitle",  SqlDbType.NVarChar, 100, info.TestTitle),
         SqlDB.MakeInParam("@TestType",   SqlDbType.NVarChar,   1, info.TestType),
         SqlDB.MakeInParam("@TestGroup",  SqlDbType.VarChar,  100, info.TestGroup),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "Join_ZhongKeTestAdd", prams).ToString(), -1));
 }
Ejemplo n.º 28
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int cuotibenAdd(Entity.cuotiben info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@Wid",         SqlDbType.Int,       4, info.Wid),
         SqlDB.MakeInParam("@TiMuId",      SqlDbType.Int,       4, info.TiMuId),
         SqlDB.MakeInParam("@Answer",      SqlDbType.NVarChar, 50, info.Answer),
         SqlDB.MakeInParam("@RightAnswer", SqlDbType.NVarChar, 50, info.RightAnswer),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(strCon, CommandType.StoredProcedure, "cuotibenAdd", prams).ToString(), -1));
 }
Ejemplo n.º 29
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int SchoolAdd(Entity.School info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@SchoolName",               SqlDbType.NVarChar, 100, info.SchoolName),
         SqlDB.MakeInParam("@SchoolEnName",             SqlDbType.NVarChar, 200, info.SchoolEnName),
         SqlDB.MakeInParam("@Logo",                     SqlDbType.NVarChar, 100, info.Logo),
         SqlDB.MakeInParam("@CengYongMing",             SqlDbType.NVarChar, 500, info.CengYongMing),
         SqlDB.MakeInParam("@SchoolWebSite",            SqlDbType.NVarChar, 200, info.SchoolWebSite),
         SqlDB.MakeInParam("@ZhaoShengWebSite",         SqlDbType.NVarChar, 200, info.ZhaoShengWebSite),
         SqlDB.MakeInParam("@ZhaoShengTel",             SqlDbType.NVarChar, 200, info.ZhaoShengTel),
         SqlDB.MakeInParam("@ProvinceId",               SqlDbType.Int,        4, info.ProvinceId),
         SqlDB.MakeInParam("@ProvinceName",             SqlDbType.NVarChar, 100, info.ProvinceName),
         SqlDB.MakeInParam("@CityName",                 SqlDbType.NVarChar, 100, info.CityName),
         SqlDB.MakeInParam("@Address",                  SqlDbType.NVarChar, 400, info.Address),
         SqlDB.MakeInParam("@FoundingTime",             SqlDbType.NVarChar,  50, info.FoundingTime),
         SqlDB.MakeInParam("@YuanShi",                  SqlDbType.NVarChar,  50, info.YuanShi),
         SqlDB.MakeInParam("@ZhongDianXueKe",           SqlDbType.NVarChar,  50, info.ZhongDianXueKe),
         SqlDB.MakeInParam("@BoShiDian",                SqlDbType.NVarChar,  50, info.BoShiDian),
         SqlDB.MakeInParam("@ShuoShiDian",              SqlDbType.NVarChar,  50, info.ShuoShiDian),
         SqlDB.MakeInParam("@SchoolIntro",              SqlDbType.NText,      0, info.SchoolIntro),
         SqlDB.MakeInParam("@SchoolCengCi",             SqlDbType.Int,        4, info.SchoolCengCi),
         SqlDB.MakeInParam("@SchoolNature",             SqlDbType.Int,        4, info.SchoolNature),
         SqlDB.MakeInParam("@YuanXiaoLeiXingId",        SqlDbType.Int,        4, info.YuanXiaoLeiXingId),
         SqlDB.MakeInParam("@YuanXiaoLeiXing",          SqlDbType.NVarChar,  40, info.YuanXiaoLeiXing),
         SqlDB.MakeInParam("@Belong",                   SqlDbType.Int,        4, info.Belong),
         SqlDB.MakeInParam("@BeLongName",               SqlDbType.NVarChar, 100, info.BeLongName),
         SqlDB.MakeInParam("@Is211",                    SqlDbType.Int,        4, info.Is211),
         SqlDB.MakeInParam("@Is985",                    SqlDbType.Int,        4, info.Is985),
         SqlDB.MakeInParam("@IsGraduateSchool",         SqlDbType.Int,        4, info.IsGraduateSchool),
         SqlDB.MakeInParam("@IsIndependentRecruitment", SqlDbType.Int,        4, info.IsIndependentRecruitment),
         SqlDB.MakeInParam("@IsNationalDefense",        SqlDbType.Int,        4, info.IsNationalDefense),
         SqlDB.MakeInParam("@IsExcellent",              SqlDbType.Int,        4, info.IsExcellent),
         SqlDB.MakeInParam("@IsMiNi211",                SqlDbType.Int,        4, info.IsMiNi211),
         SqlDB.MakeInParam("@IsRuralSpecial",           SqlDbType.Int,        4, info.IsRuralSpecial),
         SqlDB.MakeInParam("@IsArtSpecialty",           SqlDbType.Int,        4, info.IsArtSpecialty),
         SqlDB.MakeInParam("@IsHighLevelAthletes",      SqlDbType.Int,        4, info.IsHighLevelAthletes),
         SqlDB.MakeInParam("@IsShiDian",                SqlDbType.Int,        4, info.IsShiDian),
         SqlDB.MakeInParam("@WuShuLianRanking",         SqlDbType.Int,        4, info.WuShuLianRanking),
         SqlDB.MakeInParam("@XiaoYouHuiRanking",        SqlDbType.Int,        4, info.XiaoYouHuiRanking),
         SqlDB.MakeInParam("@MinBanRanking",            SqlDbType.Int,        4, info.MinBanRanking),
         SqlDB.MakeInParam("@DuLiXueYuanRanking",       SqlDbType.Int,        4, info.DuLiXueYuanRanking),
         SqlDB.MakeInParam("@ClickNum",                 SqlDbType.Int,        4, info.ClickNum),
         SqlDB.MakeInParam("@IsPause",                  SqlDbType.Int,        4, info.IsPause),
         SqlDB.MakeInParam("@BanXueLeiXing",            SqlDbType.Int,        4, info.BanXueLeiXing),
         SqlDB.MakeInParam("@Email",                    SqlDbType.NVarChar,  50, info.Email),
         SqlDB.MakeInParam("@ZipCode",                  SqlDbType.NVarChar,  20, info.ZipCode),
         SqlDB.MakeInParam("@CollectionBooks",          SqlDbType.NVarChar, 200, info.CollectionBooks),
         SqlDB.MakeInParam("@Pic",                      SqlDbType.NVarChar, 100, info.Pic),
         SqlDB.MakeInParam("@StudentCount",             SqlDbType.NVarChar, 100, info.StudentCount),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "SchoolAdd", prams).ToString(), -1));
 }
Ejemplo n.º 30
0
 /// <summary>
 /// 调用存储过程增加一个
 /// </summary>
 /// <param name="info">实体对象</param>
 /// <returns>正常返回大于 0 的自增id, 0代表重复,否则返回-1</returns>
 public static int YKStudentXinXiAdd(Entity.YKStudentXinXi info)
 {
     SqlParameter[] prams =
     {
         SqlDB.MakeInParam("@StudentName",      SqlDbType.NVarChar,  50, info.StudentName),
         SqlDB.MakeInParam("@SshengId",         SqlDbType.Int,        4, info.SshengId),
         SqlDB.MakeInParam("@Ssheng",           SqlDbType.NVarChar,  50, info.Ssheng),
         SqlDB.MakeInParam("@SshiId",           SqlDbType.Int,        4, info.SshiId),
         SqlDB.MakeInParam("@Sshi",             SqlDbType.NVarChar,  50, info.Sshi),
         SqlDB.MakeInParam("@SQuId",            SqlDbType.Int,        4, info.SQuId),
         SqlDB.MakeInParam("@SQu",              SqlDbType.NVarChar,  50, info.SQu),
         SqlDB.MakeInParam("@Sex",              SqlDbType.Int,        4, info.Sex),
         SqlDB.MakeInParam("@KaoShengPhone",    SqlDbType.NVarChar,  50, info.KaoShengPhone),
         SqlDB.MakeInParam("@ChuShengRiQi",     SqlDbType.NVarChar,  50, info.ChuShengRiQi),
         SqlDB.MakeInParam("@JiaZhangPhone",    SqlDbType.NVarChar,  50, info.JiaZhangPhone),
         SqlDB.MakeInParam("@BiYeXueXiao",      SqlDbType.NVarChar,  50, info.BiYeXueXiao),
         SqlDB.MakeInParam("@Email",            SqlDbType.NVarChar,  50, info.Email),
         SqlDB.MakeInParam("@Sqq",              SqlDbType.NVarChar,  50, info.Sqq),
         SqlDB.MakeInParam("@BaoKaoType",       SqlDbType.Int,        4, info.BaoKaoType),
         SqlDB.MakeInParam("@JiaFenFW",         SqlDbType.Int,        4, info.JiaFenFW),
         SqlDB.MakeInParam("@FenZhi",           SqlDbType.NVarChar,  50, info.FenZhi),
         SqlDB.MakeInParam("@IsJBWL",           SqlDbType.Int,        4, info.IsJBWL),
         SqlDB.MakeInParam("@TJZYSXQK",         SqlDbType.NVarChar, 500, info.TJZYSXQK),
         SqlDB.MakeInParam("@GRChengJiYouShi",  SqlDbType.Int,        4, info.GRChengJiYouShi),
         SqlDB.MakeInParam("@YiKaoChengShiId",  SqlDbType.Int,        4, info.YiKaoChengShiId),
         SqlDB.MakeInParam("@YiKaoChengShi",    SqlDbType.NVarChar,  50, info.YiKaoChengShi),
         SqlDB.MakeInParam("@YiKaoTypeId",      SqlDbType.Int,        4, info.YiKaoTypeId),
         SqlDB.MakeInParam("@YiKaoType",        SqlDbType.NVarChar,  50, info.YiKaoType),
         SqlDB.MakeInParam("@KaoShengType",     SqlDbType.Int,        4, info.KaoShengType),
         SqlDB.MakeInParam("@YiXiangDiQu",      SqlDbType.NVarChar, 100, info.YiXiangDiQu),
         SqlDB.MakeInParam("@YiXiangZhuanYe",   SqlDbType.NVarChar, 100, info.YiXiangZhuanYe),
         SqlDB.MakeInParam("@YuanXiaoType",     SqlDbType.Int,        4, info.YuanXiaoType),
         SqlDB.MakeInParam("@YiXiangYuanXiao",  SqlDbType.NVarChar, 100, info.YiXiangYuanXiao),
         SqlDB.MakeInParam("@LianKaoChengJi",   SqlDbType.NVarChar,  50, info.LianKaoChengJi),
         SqlDB.MakeInParam("@BanXueType",       SqlDbType.Int,        4, info.BanXueType),
         SqlDB.MakeInParam("@XiaoKaoQingKuang", SqlDbType.NVarChar,   0, info.XiaoKaoQingKuang),
         SqlDB.MakeInParam("@Meto",             SqlDbType.NVarChar,   0, info.Meto),
         SqlDB.MakeInParam("@YGYuWen",          SqlDbType.NVarChar,  50, info.YGYuWen),
         SqlDB.MakeInParam("@YGShuXue",         SqlDbType.NVarChar,  50, info.YGShuXue),
         SqlDB.MakeInParam("@YGYingYu",         SqlDbType.NVarChar,  50, info.YGYingYu),
         SqlDB.MakeInParam("@YGZongHe",         SqlDbType.NVarChar,  50, info.YGZongHe),
         SqlDB.MakeInParam("@YGZongFen",        SqlDbType.NVarChar,  50, info.YGZongFen),
         SqlDB.MakeInParam("@GKYuWen",          SqlDbType.NVarChar,  50, info.GKYuWen),
         SqlDB.MakeInParam("@GKShuXue",         SqlDbType.NVarChar,  50, info.GKShuXue),
         SqlDB.MakeInParam("@GKYingYu",         SqlDbType.NVarChar,  50, info.GKYingYu),
         SqlDB.MakeInParam("@GKZhongHe",        SqlDbType.NVarChar,  50, info.GKZhongHe),
         SqlDB.MakeInParam("@GKZongFen",        SqlDbType.NVarChar,  50, info.GKZongFen),
         SqlDB.MakeInParam("@DianId",           SqlDbType.Int,        4, info.DianId),
         SqlDB.MakeInParam("@IsPause",          SqlDbType.Int,        4, info.IsPause),
         SqlDB.MakeInParam("@GaoKaoKaHao",      SqlDbType.NVarChar,  50, info.GaoKaoKaHao),
     };
     return(Basic.Utils.StrToInt(SqlDB.ExecuteScalar(CommandType.StoredProcedure, "YKStudentXinXiAdd", prams).ToString(), -1));
 }