Exemplo n.º 1
0
        private void CopyAdd(int id)
        {
            DeliveryNote objNote = null;

            try
            {
                DeliveryDAC dac = new DeliveryDAC();
                objNote = dac.Select(id);
            }
            catch (Exception ex)
            {
                MessageBox.Show("操作数据库出错,请检查网络;\r\n原因:" + ex.Message);
                return;
            }

            if (objNote == null)
            {
                MessageBox.Show("查询出错");
                return;
            }

            frmEditDelivery frm = new frmEditDelivery();

            frm.EditMode = 1;
            frm.objNote  = objNote;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                RefreshData();
            }
        }
Exemplo n.º 2
0
        private void Add()
        {
            frmEditDelivery frm = new frmEditDelivery();

            frm.EditMode = 0;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                RefreshData();
            }
        }