示例#1
0
        public Part(int ID)
        {
            DB = new DBObject();
            DataSet ds = new DataSet();

            ds              = DB.Query($"SELECT * FROM dele WHERE ID = {ID}");
            this.ID         = (int)ds.Tables[0].Rows[0][0];
            CaseID          = (int)ds.Tables[0].Rows[0][1];
            PartName        = (string)ds.Tables[0].Rows[0][2];
            Price           = (double)ds.Tables[0].Rows[0][3];
            Status          = new PartStatus((int)ds.Tables[0].Rows[0][4]);
            LastChangedDate = Convert.ToDateTime(ds.Tables[0].Rows[0][5]);
        }
示例#2
0
 public Part()
 {
     DB     = new DBObject();
     Status = new PartStatus();
 }