Beispiel #1
0
        public M_DeviceM_Info GetModelFromReader(DbDataReader rdr)
        {
            M_DeviceM_Info model = new M_DeviceM_Info();

            model.ID        = Convert.ToInt32(rdr["ID"]);
            model.Alias     = ConverToStr(rdr["Alias"]);
            model.Domain    = ConverToStr(rdr["Domain"]);
            model.IP        = ConverToStr(rdr["IP"]);
            model.M_User    = ConverToStr(rdr["M_User"]);
            model.M_Pwd     = ConverToStr(rdr["M_Pwd"]);
            model.M_Channel = ConvertToInt(rdr["M_Channel"]);
            model.AdminID   = ConvertToInt(rdr["AdminID"]);
            model.ZStatus   = ConvertToInt(rdr["ZStatus"]);
            model.CDate     = ConvertToDate(rdr["CDate"]);
            model.Remind    = ConverToStr(rdr["Remind"]);
            model.M_Port    = ConvertToInt(rdr["M_Port"]);
            rdr.Close();
            return(model);
        }
Beispiel #2
0
        public override SqlParameter[] GetParameters()
        {
            M_DeviceM_Info model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.Alias;
            sp[2].Value  = model.Domain;
            sp[3].Value  = model.IP;
            sp[4].Value  = model.M_User;
            sp[5].Value  = model.M_Pwd;
            sp[6].Value  = model.M_Channel;
            sp[7].Value  = model.AdminID;
            sp[8].Value  = model.ZStatus;
            sp[9].Value  = model.CDate;
            sp[10].Value = model.Remind;
            sp[11].Value = model.M_Port;
            return(sp);
        }