Ejemplo n.º 1
0
        public override SqlParameter[] GetParameters()
        {
            M_Docs_Item model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value = model.FileName;
            sp[1].Value = model.FileContent;
            sp[2].Value = model.PdfContent;
            sp[3].Value = model.FileType;
            sp[4].Value = model.UserID;
            sp[5].Value = model.UserName;
            sp[6].Value = model.ZStatus;
            sp[7].Value = model.Remind;
            sp[8].Value = model.CDate;
            return(sp);
        }
Ejemplo n.º 2
0
        public M_Docs_Item GetModelFromReader(DbDataReader rdr)
        {
            M_Docs_Item model = new M_Docs_Item();

            model.ID          = Convert.ToInt32(rdr["ID"]);
            model.FileName    = ConverToStr(rdr["FileName"]);
            model.FileContent = ConverToBytes(rdr["FileContent"]);
            model.PdfContent  = ConverToBytes(rdr["PdfContent"]);
            model.FileType    = ConverToStr(rdr["FileType"]);
            model.UserID      = ConvertToInt(rdr["UserID"]);
            model.UserName    = ConverToStr(rdr["UserName"]);
            model.ZStatus     = ConvertToInt(rdr["ZStatus"]);
            model.Remind      = ConverToStr(rdr["Remind"]);
            model.CDate       = ConvertToDate(rdr["CDate"]);
            rdr.Close();
            return(model);
        }