コード例 #1
0
        public async void ShowDialog(clsMyOrder prOrder)
        {
            _Order      = prOrder;
            _Instrument = await Admin.ServiceClient.GetInstrumentAsync(_Order.SerialNo);

            UpdateDisplay();
            ShowDialog();
        }
コード例 #2
0
        internal static async Task <string> DeleteInstrumentAsync(clsAllInstruments prInstrument)
        {
            using (HttpClient lcHttpClient = new HttpClient())
            {
                HttpResponseMessage lcRespMessage = await lcHttpClient.DeleteAsync
                                                        ($"http://localhost:60065/api/shop/DeleteInstrument?SerialNo={prInstrument.SerialNo}");

                return(await lcRespMessage.Content.ReadAsStringAsync());
            }
        }
コード例 #3
0
ファイル: FrmCategory.cs プロジェクト: winnermaker/Musicshop
 private void add_Click(object sender, EventArgs e)
 {
     try
     {
         string lcReply = new InputBox(clsAllInstruments.FACTORY_PROMPT).Answer;
         if (!string.IsNullOrEmpty(lcReply)) // not cancelled?
         {
             clsAllInstruments lcInstrument = clsAllInstruments.NewWork(lcReply[0]);
             if (lcInstrument != null) // valid instrument created?
             {
                 lcInstrument.CategoryName = _Category.CategoryName;
                 FrmInstrument.DispatchInstrumentForm(lcInstrument);
                 if (!string.IsNullOrEmpty(lcInstrument.InstrumentName)) // not cancelled?
                 {
                     refreshFormFromDBAsync(_Category.CategoryName);
                     FrmMain.Instance.UpdateDisplayAsync();
                 }
             }
         }
     }
     catch (Exception)
     {
     }
 }
コード例 #4
0
 internal static async Task <string> UpdateInstrumentAsync(clsAllInstruments prInstrument)
 {
     return(await InsertOrUpdateAsync(prInstrument, "http://localhost:60065/api/shop/PutInstrument", "PUT"));
 }
コード例 #5
0
 public static void Run(clsAllInstruments prUsedInstrument)
 {
     Instance.SetDetails(prUsedInstrument);
 }
コード例 #6
0
 public static void DispatchInstrumentForm(clsAllInstruments prInstrument)
 {
     _InstrumentForm[prInstrument.InstrumentType].DynamicInvoke(prInstrument);
 }
コード例 #7
0
 public void SetDetails(clsAllInstruments prInstrument)
 {
     _Instrument = prInstrument;
     updateForm();
     ShowDialog();
 }