Пример #1
0
 private void Dgv1_CellEnter(object sender, DataGridViewCellEventArgs e)
 {
     //e.ColumnIndex
     if (Dgv1.Columns[e.ColumnIndex].DefaultCellStyle.ForeColor == Color.Blue)
     {
         Dgv1.BeginEdit(true);
     }
 }
Пример #2
0
 private void Dgv1_CellEnter(object sender, DataGridViewCellEventArgs e)
 {
     //Dgv1.BeginEdit(true);
     //if (!Withup) { return; }
     if (WithUp & !Podtv.Checked)
     {
         Dgv1.BeginEdit(true);
     }
 }
Пример #3
0
 private void Dgv1_CellEnter(object sender, DataGridViewCellEventArgs e)
 {
     Dgv1.BeginEdit(true);
     if (e.ColumnIndex == 0)
     {
         oldkodir = Dgv1.Rows[e.RowIndex].Cells["kodir"].Value.ToString();
     }
     Ras(e);
 }
Пример #4
0
 private void Dgv1_CellEnter(object sender, DataGridViewCellEventArgs e)
 {
     if (!Withup)
     {
         return;
     }
     if (Dgv1.EditMode != DataGridViewEditMode.EditProgrammatically)
     {
         Dgv1.BeginEdit(true);
     }
 }
Пример #5
0
 private void Dgv1_CellEnter(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 9)
     {
         Dgv1.BeginEdit(true);
     }
     else
     {
         Dgv1.EndEdit();
     }
 }
Пример #6
0
 private void Dgv1_CellEnter(object sender, DataGridViewCellEventArgs e)
 {
     if (WithOpen)
     {
         return;
     }
     if ((e.ColumnIndex >= 13 || Dgv1.Columns[e.ColumnIndex].Name == "idisp") && Dgv1.Rows[e.RowIndex].DefaultCellStyle.BackColor != Color.LightCyan)
     {
         Dgv1.BeginEdit(true);
     }
     else
     {
         Dgv1.EndEdit();
     }
 }
Пример #7
0
 private void Dgv1_CellEnter(object sender, DataGridViewCellEventArgs e)
 {
     if (WithOpen)
     {
         return;
     }
     if (Dgv1.Columns[e.ColumnIndex].DefaultCellStyle.ForeColor == Color.Blue)
     {
         Dgv1.BeginEdit(true);
     }
     else
     {
         Dgv1.EndEdit();
     }
 }
Пример #8
0
        private void tsbAdd_Click(object sender, EventArgs e)
        {
            if (nbut1 == 8)
            {
                my.sc.CommandText = "exec sNewSmeta 10,0,1," + my.Id_us.ToString() + ",1 ";
                my.cn.Open();

                my.Szap = my.sc.ExecuteScalar().ToString();
                my.cn.Close();
                int idsm = Convert.ToInt32(my.Szap);
                if (!my.isFormInMdi("frmCapSm", idsm, my.MDIForm))
                {
                    frmCapSm fr = new frmCapSm();
                    fr.MdiParent = my.MDIForm;
                    fr.idsm      = idsm;
                    fr.Tag       = my.Szap;
                    fr.Show();
                }
            }
            //if (nbut1 == 704)
            //{
            //    DataRow dr = ds.Tables[0].Rows.Add();
            //    //my.sc.CommandText = "exec sNewSmeta 10,0,1," + my.Id_us.ToString() + ",1 ";
            //    //my.cn.Open();

            //    //my.Szap = my.sc.ExecuteScalar().ToString();
            //    //my.cn.Close();
            //    //int idsm = Convert.ToInt32(my.Szap);
            //    //if (!my.isFormInMdi("frmCapSm", idsm, my.MDIForm))
            //    //{
            //    //    frmCapSm fr = new frmCapSm();
            //    //    fr.MdiParent = my.MDIForm;
            //    //    fr.idsm = idsm;
            //    //    fr.Tag = my.Szap;
            //    //    fr.Show();

            //    //}
            //}
            //else
            {
                DataRow dr = ds.Tables[0].Rows.Add();
                dr[1]            = ' ';
                Dgv1.CurrentCell = Dgv1.Rows[Dgv1.Rows.Count - 1].Cells[1];
                Dgv1.BeginEdit(true);
            }
        }