Exemplo n.º 1
0
 private void btnSaleModify_Click(object sender, EventArgs e)
 {
     if (this.dgvSale.SelectedRows.Count > 0)
     {
         DataGridViewRow row = this.dgvSale.SelectedRows[0];
         using (var form = new TradeEdit(mode.Edit, row.Cells["dgvSale_Serno"].Value.ToString()))
         {
             panelSale.Visible = false;
             panelMask.Visible = true;
             var result = form.ShowDialog();
             panelSale.Visible = true;
             panelMask.Visible = false;
         }
         saleLoadData(ddlSalePage.SelectedIndex + 1);
     }
 }
Exemplo n.º 2
0
        private void submit()
        {
            RosterInfo vRoster = new RosterInfo(APConfig.Conn);

            vRoster.Conditions = vRoster.getCondition(RosterInfo.ncConditions.main.ToString(), txtMain.Text);
            if (!vRoster.load())
            {
                APConfig.SweetAlert(ShowBoxType.alert, "查無此主要號碼");
            }
            else
            {
                this.Hide();
                TradeEdit form = new TradeEdit(mode.Add, "", vRoster);
                form.ShowDialog();
                this.Close();
            }
        }
Exemplo n.º 3
0
        private void dgvSale_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }
            DataGridViewRow row = this.dgvSale.SelectedRows[0];

            using (var form = new TradeEdit(mode.View, row.Cells["dgvSale_Serno"].Value.ToString()))
            {
                panelSale.Visible = false;
                panelMask.Visible = true;
                var result = form.ShowDialog();
                panelSale.Visible = true;
                panelMask.Visible = false;
            }
        }