Beispiel #1
0
        public M_Publish_Node GetModelFromReader(DbDataReader sdr)
        {
            M_Publish_Node model = new M_Publish_Node();

            model.ID       = Convert.ToInt32(sdr["ID"]);
            model.Pid      = ConvertToInt(sdr["Pid"]);
            model.NodeName = ConverToStr(sdr["NodeName"]);
            model.Describe = ConverToStr(sdr["Describe"]);
            model.CDate    = ConvertToDate(sdr["CDate"]);
            model.CAdmin   = ConvertToInt(sdr["CAdmin"]);
            model.Auth     = ConverToStr(sdr["Auth"]);
            return(model);
        }
Beispiel #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Publish_Node model = this;

            if (CDate.Year < 1901)
            {
                CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.Pid;
            sp[2].Value = model.NodeName;
            sp[3].Value = model.Describe;
            sp[4].Value = model.CDate;
            sp[5].Value = model.CAdmin;
            sp[6].Value = model.Auth;
            return(sp);
        }