示例#1
0
        public List <LOLItem> SelectItem(List <LOLItem> itemList) // 버전 체크
        {
            string version = String.Empty;

            using (SqlConnection con = DBConnection.Connecting())
            {
                con.Open();

                SqlCommand cmd = new SqlCommand();
                cmd.Connection  = con;
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "SelectItem";

                SqlDataReader sdr = cmd.ExecuteReader();

                while (sdr.Read())
                {
                    LOLItem item = new LOLItem();
                    item.Code        = sdr["code"].ToString();
                    item.Name        = sdr["name"].ToString();
                    item.Description = sdr["description"].ToString();
                    item.Plaintext   = sdr["plaintext"].ToString();
                    item.ImageName   = sdr["imagename"].ToString();
                    item.Gold        = int.Parse(sdr["gold"].ToString());
                    item.From        = sdr["from"].ToString().Split(',');
                    item.Into        = sdr["into"].ToString().Split(',');
                    item.Tags        = sdr["tags"].ToString().Split(',');

                    byte[]       array = (byte[])sdr["image"];
                    MemoryStream ms    = new MemoryStream(array);
                    Image        image = Image.FromStream(ms);
                    item.Image = image;
                    itemList.Add(item);
                }

                con.Close();
            }

            return(itemList);
        }
示例#2
0
 public DetailItem(LOLItem lItem) : this()
 {
     this.lItem = lItem;
 }