public override SqlParameter[] GetParameters() { M_Exam_Sys_Questions model = this; if (p_CreateTime <= DateTime.MinValue) { p_CreateTime = DateTime.Now; } SqlParameter[] sp = GetSP(); sp[0].Value = model.p_id; sp[1].Value = model.p_title; sp[2].Value = model.p_Difficulty; sp[3].Value = model.p_Class; sp[4].Value = model.p_Views; sp[5].Value = model.p_Inputer; sp[6].Value = model.p_Type; sp[7].Value = model.p_Knowledge; sp[8].Value = model.p_Answer; sp[9].Value = model.p_Content; sp[10].Value = model.p_CreateTime; sp[11].Value = model.Paper_Id; sp[12].Value = model.p_Order; sp[13].Value = model.p_Shipin; sp[14].Value = model.p_Optioninfo; sp[15].Value = model.p_ChoseNum; sp[16].Value = model.p_shuming; sp[17].Value = model.p_defaultScores; sp[18].Value = model.IsBig; sp[19].Value = model.parentId; sp[20].Value = model.Jiexi; sp[21].Value = model.Tagkey; sp[22].Value = model.UserID; sp[23].Value = model.Qinfo; sp[24].Value = model.IsShare; sp[25].Value = model.IsSystem; sp[26].Value = model.Version; sp[27].Value = model.LargeContent; sp[28].Value = model.IsSmall; return(sp); }
public M_Exam_Sys_Questions GetModelFromReader(DbDataReader rdr) { M_Exam_Sys_Questions model = new M_Exam_Sys_Questions(); model.p_id = ConvertToInt(rdr["p_id"]); model.p_title = ConverToStr(rdr["p_title"]); model.p_Difficulty = ConverToDouble(rdr["p_Difficulty"]); model.p_Class = ConvertToInt(rdr["p_Class"]); model.p_Views = ConvertToInt(rdr["p_Views"]); model.p_Inputer = ConverToStr(rdr["p_Inputer"]); model.p_Type = ConvertToInt(rdr["p_Type"]); model.p_Knowledge = ConvertToInt(rdr["p_Knowledge"]); model.p_Answer = ConverToStr(rdr["p_Answer"]); model.p_Content = ConverToStr(rdr["p_Content"]); model.p_CreateTime = ConvertToDate(rdr["p_CreateTime"]); model.Paper_Id = ConvertToInt(rdr["Paper_Id"]); model.p_Order = ConvertToInt(rdr["p_Order"]); model.p_Shipin = ConverToStr(rdr["p_Shipin"]); model.p_Optioninfo = ConverToStr(rdr["p_Optioninfo"]); model.p_ChoseNum = ConvertToInt(rdr["p_ChoseNum"]); model.p_shuming = ConverToStr(rdr["p_shuming"]); model.p_defaultScores = ConvertToInt(rdr["p_defaultScores"]); model.IsBig = ConvertToInt(rdr["IsToShare"]); model.parentId = ConvertToInt(rdr["parentId"]); model.Jiexi = ConverToStr(rdr["Jiexi"]); model.Tagkey = ConverToStr(rdr["Tagkey"]); model.UserID = ConvertToInt(rdr["UserID"]); model.Qinfo = ConverToStr(rdr["Qinfo"]); model.IsShare = ConvertToInt(rdr["IsShare"]); model.IsSystem = ConvertToInt(rdr["IsSystem"]); model.Version = ConvertToInt(rdr["Version"]); model.LargeContent = ConverToStr(rdr["LargeContent"]); model.IsSmall = ConvertToInt(rdr["IsSmall"]); rdr.Close(); return(model); }