Exemple #1
0
        public M_Plat_Sign GetModelFromReader(DbDataReader rdr)
        {
            M_Plat_Sign model = new M_Plat_Sign();

            model.ID         = ConvertToInt(rdr["ID"]);
            model.UserID     = ConvertToInt(rdr["UserID"]);
            model.CDate      = ConvertToDate(rdr["CDate"]);
            model.ZType      = ConvertToInt(rdr["ZType"]);
            model.State      = Convert.ToInt32(rdr["State"]);
            model.IP         = rdr["IP"].ToString();
            model.Remind     = rdr["Remind"].ToString();
            model.IPLocation = rdr["IPLocation"].ToString();
            rdr.Close();
            return(model);
        }
Exemple #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Plat_Sign model = this;

            if (CDate <= DateTime.MinValue)
            {
                CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.UserID;
            sp[2].Value = model.IP;
            sp[3].Value = model.IPLocation;
            sp[4].Value = model.ZType;
            sp[5].Value = model.State;
            sp[6].Value = model.CDate;
            sp[7].Value = model.Remind;
            return(sp);
        }