コード例 #1
0
 private void PersonalInfDelFrm_Load(object sender, EventArgs e)
 {
     try
     {
         var db = new linqDataContext();
         GVTableDelSrv.DataSource = db.ShowSrvman();
         this.FormBorderStyle     = FormBorderStyle.FixedDialog;
     }
     catch (System.Exception ex)
     {
         System.Windows.Forms.MessageBox.Show(ex.Message);
     }
 }
コード例 #2
0
        private void btnDelSrv_Click(object sender, EventArgs e)
        {
            try
            {
                if (GVTableDelSrv.RowCount > 0)
                {
                    var db = new linqDataContext();
                    db.DelSrvman(Convert.ToInt32(GVTableDelSrv.CurrentRow.Cells[0].Value));
                    GVTableDelSrv.DataSource = db.ShowSrvman();
                }
            }

            catch (System.Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
            }
        }