private void ShowNotfication() { notify.Title = "Login"; notify.Message = "User Login Successful..."; notify.ShowNotfySucess(); notify.Title = "Login"; notify.Message = "Your Change Password in Acount Form"; notify.ShowNotfyInformation(); }
private void SaveOrderCart() { try { if (string.IsNullOrEmpty(txt_discount.Text)) { var db = new DbManagement(); var d = DateTime.Now.ToString("dd/MMM/yyy"); db.InserCart(tranNO, pId, price, txt_quantity.Text, 0.0, 0.0, d, "Pending"); notify.Title = "POS Management Form"; notify.Message = "Sales Products Successful..."; notify.ShowNotfySucess(); notify.Title = "POS Management Form"; notify.Message = "Product :" + txt_product_name.Text + " Quantity :" + txt_quantity.Text; notify.ShowNotfyInformation(); this.Dispatcher.BeginInvoke(new Action(() => { this.Close(); })); } else { var db = new DbManagement(); var d = DateTime.Now.ToString("dd/MMM/yyy"); db.InserCart(tranNO, pId, price, txt_quantity.Text, Convert.ToDouble(txt_discount.Text), 0.0, d, "Pending"); notify.Title = "POS Management Form"; notify.Message = "Sales Products Successful..."; notify.ShowNotfySucess(); notify.Title = "POS Management Form"; notify.Message = "Product :" + txt_product_name.Text + " Quantity :" + txt_quantity.Text; notify.ShowNotfyInformation(); this.Dispatcher.BeginInvoke(new Action(() => { this.Close(); })); } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void btn_refreshData_Click(object sender, RoutedEventArgs e) { this.Dispatcher.BeginInvoke(new Action(() => { //grid_cart.RefreshColumns(); LoadDatarefresh(); var notify = new SetNotify(); notify.Title = "POS Management Form"; notify.Message = "Refresh Data Successful..."; notify.ShowNotfyInformation(); clearText(); })); }
private void RemoveItemCart(RoutedEventArgs e) { try { var item = this.grid_cart.CurrentItem as DataRowView; var datarow = (item as DataRowView).Row; var tranId = datarow["TransactionNo"].ToString(); db.RemoveCart(tranId); var notify = new SetNotify(); notify.Title = "POS Management Form"; notify.Message = "Remove Data Successful..."; notify.ShowNotfyInformation(); this.Dispatcher.BeginInvoke(new Action(() => { LoadDatarefresh(); })); } catch (Exception ex) { MessageBox.Show(ex.Message + ""); } }
private void getTransactionNo() { try { Int64 s2 = Convert.ToInt64(DateTime.Now.ToString("dMyyHH")); var r = new Random(); var s1 = r.Next(000, 102000); var s3 = r.Next(00000, 1000000); txt_transaction.Text = (s1 + 1) + "" + s2 + "" + (s3 + 1); var notify = new SetNotify(); notify.Title = "POS Management Form"; notify.Message = "Create Transaction No Successful..."; notify.ShowNotfyInformation(); var searchProduct = new SearchProducts(txt_transaction.Text); //set back grounnd searchProduct.Closed += delegate { this.Opacity = 1; //close search form alter add product to cart complete grid_cart.ItemsSource = db.searchCart(txt_transaction.Text); getTotalAmount(txt_transaction.Text); }; if (searchProduct != null) { this.Opacity = 0.2; searchProduct.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.GetType().Name + ""); } }