protected override void PushData() { base.PushData(); clsAllInstrument lcInstrument = (clsAllInstrument)_Instrument; _Instrument.WarrantyPeriod = txtWarrantyPeriod.Text; _Instrument.ImportDate = txtImportDate.Text; }
protected override void UpdateForm() { base.UpdateForm(); clsAllInstrument lcInstrument = (clsAllInstrument)_Instrument; txtWarrantyPeriod.Text = _Instrument.WarrantyPeriod; txtImportDate.Text = Convert.ToString(_Instrument.ImportDate); }
protected override void PushData() { base.PushData(); clsAllInstrument lcInstrument = (clsAllInstrument)_Instrument; _Instrument.Condition = cbCondition.Text; _Instrument.DateOfReturn = txtReturnDate.Text; }
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()); } }
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(); } } } }
public void SetDetails(clsAllInstrument prInstrument) { _Instrument = prInstrument; UpdateForm(); ShowDialog(); }
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")); }
public static void Run(clsAllInstrument prInstrument) { //Instance.Show(); Instance.SetDetails(prInstrument); }