コード例 #1
0
        public FrmEditShowItem(ArtShowItem item, int artistAttendingID = -1)
        {
            InitializeComponent();
            TxtNotes.SetWatermark("Optional");
            TxtBid.SetWatermark("NFS If Blank");
            TxtPrintMax.SetWatermark("Optional");

            ShowItem = item ?? new ArtShowItem();
            if (artistAttendingID > -1)
            {
                ShowItem.ArtistAttendingID = artistAttendingID;
            }
            if (item == null)
            {
                return;
            }

            LblShowNumber.Text = ShowItem.ShowNumber != null?ShowItem.ShowNumber.ToString() : "TBD";

            TxtTitle.Text       = ShowItem.Title;
            ChkOriginal.Checked = ShowItem.IsOriginal;
            TxtMedia.Text       = ShowItem.Media;
            TxtPrintNum.Text    = ShowItem.PrintNumber ?? "";
            TxtPrintMax.Text    = ShowItem.PrintMaxNumber ?? "";
            TxtBid.Text         = ShowItem.MinimumBid != null?ShowItem.MinimumBid.ToString() : "";

            TxtNotes.Text             = ShowItem.Notes ?? "";
            TxtLocation.Text          = ShowItem.LocationCode ?? "";
            CmbCategory.SelectedIndex = ShowItem.Category != null?CmbCategory.FindString(ShowItem.Category) : 0;
        }
コード例 #2
0
        public FrmEditShopItem(PrintShopItem item, int artistAttendingID = -1)
        {
            InitializeComponent();
            TxtNotes.SetWatermark("Optional");
            TxtPrice.SetWatermark("NFS If Blank");

            ShopItem = item ?? new PrintShopItem();
            if (artistAttendingID > -1)
            {
                ShopItem.ArtistAttendingID = artistAttendingID;
            }
            if (item == null)
            {
                return;
            }

            LblShowNumber.Text = ShopItem.ShowNumber != null?ShopItem.ShowNumber.ToString() : "TBD";

            TxtTitle.Text             = ShopItem.Title;
            TxtMedia.Text             = ShopItem.Media;
            NumQuantitySent.Value     = ShopItem.QuantitySent;
            TxtPrice.Text             = ShopItem.Price.ToString();
            TxtNotes.Text             = ShopItem.Notes ?? "";
            TxtLocation.Text          = ShopItem.LocationCode ?? "";
            CmbCategory.SelectedIndex = ShopItem.Category != null?CmbCategory.FindString(ShopItem.Category) : 0;
        }