Esempio n. 1
0
        private void btnAdd_Click(object sender, System.EventArgs e)
        {
            frmDataEditItems f = new frmDataEditItems();

            f.ShowDialog();
            ReadDatas();
        }
Esempio n. 2
0
        private void btnEdit_Click(object sender, System.EventArgs e)
        {
            try
            {
                if (NoRecordDataGrid())
                {
                    return;
                }

                int              row    = dataGrid1.CurrentCell.RowNumber;
                int              col    = 1;
                string           Name   = dataGrid1[row, col].ToString().Trim();
                string           wValue = dataGrid1[row, 3].ToString().Trim();
                DateTime         dt     = DateTime.Parse(dataGrid1[row, 7].ToString().Trim());
                string           wLL    = dataGrid1[row, 2].ToString().Trim();
                string           editID = dataGrid1[row, 0].ToString().Trim();
                frmDataEditItems f      = new frmDataEditItems(Name, wValue, dt, wLL, editID);
                f.ShowDialog();
                ReadDatas();
            }
            catch
            {
            }
        }
Esempio n. 3
0
 private void btnAdd_Click(object sender, System.EventArgs e)
 {
     frmDataEditItems f=new frmDataEditItems();
     f.ShowDialog();
     ReadDatas();
 }
Esempio n. 4
0
        private void btnEdit_Click(object sender, System.EventArgs e)
        {
            try
            {
                if(NoRecordDataGrid()) {return;}

                int row=dataGrid1.CurrentCell.RowNumber;
                int col=1;
                string Name=dataGrid1[row,col].ToString().Trim();
                string wValue=dataGrid1[row,3].ToString().Trim();
                DateTime dt=DateTime.Parse(dataGrid1[row,7].ToString().Trim());
                string wLL=dataGrid1[row,2].ToString().Trim();
                string editID=dataGrid1[row,0].ToString().Trim();
                frmDataEditItems f=new frmDataEditItems(Name,wValue,dt,wLL,editID);
                f.ShowDialog();
                ReadDatas();
            }
            catch
            {
            }
        }