示例#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
文件: frmKP.cs 项目: jane-safr/SMRC
 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);
            }
        }