Exemplo n.º 1
0
        protected override void PushData()
        {
            base.PushData();
            clsAllInstrument lcInstrument = (clsAllInstrument)_Instrument;

            _Instrument.WarrantyPeriod = txtWarrantyPeriod.Text;
            _Instrument.ImportDate     = txtImportDate.Text;
        }
Exemplo n.º 2
0
        protected override void UpdateForm()
        {
            base.UpdateForm();
            clsAllInstrument lcInstrument = (clsAllInstrument)_Instrument;

            txtWarrantyPeriod.Text = _Instrument.WarrantyPeriod;
            txtImportDate.Text     = Convert.ToString(_Instrument.ImportDate);
        }
Exemplo n.º 3
0
        protected override void PushData()
        {
            base.PushData();
            clsAllInstrument lcInstrument = (clsAllInstrument)_Instrument;

            _Instrument.Condition    = cbCondition.Text;
            _Instrument.DateOfReturn = txtReturnDate.Text;
        }
Exemplo n.º 4
0
        protected override void UpdateForm()
        {
            base.UpdateForm();
            clsAllInstrument lcInstrument = (clsAllInstrument)_Instrument;

            cbCondition.Text   = _Instrument.Condition;
            txtReturnDate.Text = Convert.ToString(_Instrument.DateOfReturn);
        }
        internal async static Task <string> DeleteInstrumentAsync(clsAllInstrument clsAllInstrument)
        {
            using (HttpClient lcHttpClient = new HttpClient())
            {
                HttpResponseMessage lcRespMessage = await lcHttpClient.DeleteAsync
                                                        ($"http://localhost:60064/api/shop/DeleteInstrument?prInstrumentID={clsAllInstrument.InstrumentID}");

                return(await lcRespMessage.Content.ReadAsStringAsync());
            }
        }
Exemplo n.º 6
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            string   lcReply;
            InputBox inputBox = new InputBox("Enter New for New Instrument, Used for Used Instrument");

            if (inputBox.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                lcReply = (inputBox.getAnswer());

                if (!string.IsNullOrEmpty(lcReply)) // not cancelled?
                {
                    clsAllInstrument lcInstrument = clsAllInstrument.CheckType(lcReply);
                    if (lcInstrument != null) // valid instrument created?
                    {
                        //lcInstrument.ArtistName = _Artist.Name;
                        frmInstrument.DispatchInstrumentForm(lcInstrument, _Category.Name);

                        refreshFormFromDBAsync(_Category.Name);
                        frmMain.Instance.UpdateDisplay();
                    }
                }
            }
        }
Exemplo n.º 7
0
 public void SetDetails(clsAllInstrument prInstrument)
 {
     _Instrument = prInstrument;
     UpdateForm();
     ShowDialog();
 }
Exemplo n.º 8
0
 public static void DispatchInstrumentForm(clsAllInstrument prInstrument, string prCategoryName)
 {
     prInstrument.CategoryName = prCategoryName;
     _InstrumentsForm[prInstrument.Type].DynamicInvoke(prInstrument);
 }
 internal async static Task <string> UpdateInstrumentAsync(clsAllInstrument prInstrument)
 {
     return(await InsertOrUpdateAsync(prInstrument, "http://localhost:60064/api/shop/PutInstrument", "PUT"));
 }
Exemplo n.º 10
0
 public static void Run(clsAllInstrument prInstrument)
 {
     //Instance.Show();
     Instance.SetDetails(prInstrument);
 }