private void button2_Click(object sender, EventArgs e) { if (ListView1.Items.Count == 0) { Interaction.MsgBox("Please select record to Update", MsgBoxStyle.Exclamation, "Update Invoice"); return; } try { if (string.IsNullOrEmpty(ListView1.FocusedItem.Text)) { } else { int iID = Convert.ToInt32(ListView1.FocusedItem.Text); frmPOS fp = new frmPOS(frmMain.StaffID, iID, true); fp.ShowDialog(); } } catch { Interaction.MsgBox("Please select invoice to update", MsgBoxStyle.Exclamation, "update"); return; } }
private void button4_Click(object sender, EventArgs e) { frmPOS lp = new frmPOS(StaffID, 0, false); lp.ShowDialog(); //Interaction.MsgBox("Under Constrution"); }
private void ViewReceipt_Load(object sender, EventArgs e) { GetCompanyInfo(); // frmSystemSetting obj = (System.Windows.Forms.Application.OpenForms["frmSystemSetting"] as frmSystemSetting); frmPOS p = (System.Windows.Forms.Application.OpenForms["frmPOS"] as frmPOS); frmPayment p1 = (System.Windows.Forms.Application.OpenForms["frmPayment"] as frmPayment); try { txtPhoneNo = p1.Usphone; } catch (Exception ex) { } // TODO: This line of code loads data into the 'reciept.DataTable1' table. You can move, or remove it, as needed. this.DataTable1TableAdapter.Fill(this.reciept.DataTable1, "" + p.InvoiceNo); DateTime now = DateTime.Now; ReportParameter startDate = new ReportParameter("Date", now.ToLongDateString()); ReportParameter phone = new ReportParameter("phone", txtPhoneNo); ReportParameter email = new ReportParameter("email", txtEmail); ReportParameter address = new ReportParameter("address", txtAddress); ReportParameter website = new ReportParameter("website", txtWebsite); this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { startDate, phone, email, address, website }); this.reportViewer1.RefreshReport(); }
private void txtCash_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { if (e.KeyChar == ControlChars.Cr) { if (Convert.ToDouble(txtTA.Text.Replace(",", "")) > Convert.ToDouble(txtCash.Text.Replace(",", ""))) { Interaction.MsgBox("Insuficient cash to paid the total amount", MsgBoxStyle.Exclamation, "payment"); txtCash.Focus(); } else { AddPayment(); if (System.Windows.Forms.Application.OpenForms["frmPOS"] != null) { frmPOS p = (System.Windows.Forms.Application.OpenForms["frmPOS"] as frmPOS); p.GetInvoiceNo(); p.AddTransaction(); p.AddTransactionDetails(); p.UpdateProductQuantity(); frmPrintReceipt pr = new frmPrintReceipt(InvoiceNo); pr.Show(); Interaction.MsgBox("Transaction completed. Press OK for a new transaction.", MsgBoxStyle.Information, "Transaction"); p.NewTransaction(); } //My.MyProject.Forms.frmPrintReceipt.Show(); this.Close(); } } }
private void txtCash_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { if (e.KeyChar == ControlChars.Cr) { if (userPhonrNo.Text == "" || userPhonrNo.Text.Length >= 12) { Interaction.MsgBox("Enter User Mobile No./ Renter Mobile No.", MsgBoxStyle.Information, "Mobile No"); userPhonrNo.Text = ""; userPhonrNo.Focus(); return; } else if (txtCash.Text == "") { Interaction.MsgBox("Enter Cash", MsgBoxStyle.Information, "Cash"); return; } else if (Convert.ToDouble(txtTA.Text.Replace(",", "")) > Convert.ToDouble(txtCash.Text.Replace(",", ""))) { Interaction.MsgBox("Insuficient cash to paid the total amount", MsgBoxStyle.Exclamation, "payment"); txtCash.Focus(); } else { AddPayment(); if (System.Windows.Forms.Application.OpenForms["frmPOS"] != null) { frmPOS p = (System.Windows.Forms.Application.OpenForms["frmPOS"] as frmPOS); p.AddTransaction(userPhonrNo.Text); p.AddTransactionDetails(p.InvoiceNo); p.UpdateProductQuantity(); // frmPrintReceipt pr = new frmPrintReceipt(InvoiceNo); // pr.Show(); Interaction.MsgBox("Transaction completed. Press OK for a new transaction.", MsgBoxStyle.Information, "Transaction"); //p.NewTransaction(); } // My.MyProject.Forms.frmPrintReceipt.Show(); Usphone = userPhonrNo.Text; ViewReceipt v = new ViewReceipt(); v.Show(); this.Close(); } } }
private void Login() { try { SQLConn.sqL = "SELECT * FROM staff WHERE Username = '******' AND Password = '******'"; SQLConn.ConnDB(); SQLConn.cmd = new SqlCommand(SQLConn.sqL, SQLConn.conn); SQLConn.dr = SQLConn.cmd.ExecuteReader(); if (SQLConn.dr.Read() == true) { if (SQLConn.dr["Role"].ToString().ToUpper() == "ADMIN") { // Show Admin Panel frmMain m = new frmMain(SQLConn.dr["Username"].ToString(), Convert.ToInt32(SQLConn.dr["StaffID"])); m.Show(); //this.Hide(); } else { // Show POS Panel frmPOS m = new frmPOS(SQLConn.dr["Username"].ToString(), Convert.ToInt32(SQLConn.dr["StaffID"]), "Staff"); m.Show(); this.Hide(); //MessageBox.Show("Staff"); } } else { Interaction.MsgBox("Invalid Password. Please try again.", MsgBoxStyle.Exclamation, "Login"); } } catch (Exception ex) { Interaction.MsgBox(ex.Message); } finally { SQLConn.cmd.Dispose(); SQLConn.conn.Close(); } }
private void button4_Click(object sender, EventArgs e) { frmPOS lp = new frmPOS(StaffID); lp.ShowDialog(); }
public frmAddProductQuick(Form callingForm) { InitializeComponent(); POS = callingForm as frmPOS; }
public frmSameBarcodeItems(string dpbarcode, Form pos) { InitializeComponent(); productBarcode = dpbarcode; POS = pos as frmPOS; }
public frmEnterQuantity(frmPOS pos, double itemPrice) { InitializeComponent(); POSForm = pos; ItemPrice = itemPrice; }
private void button4_Click(object sender, EventArgs e) { frmPOS lp = new frmPOS(Username, StaffID, "System, Admin"); lp.ShowDialog(); }
public frmEnterPassword(frmPOS pos) { InitializeComponent(); POSForm = pos; }