Пример #1
0
 private void b_jfdf_Click(object sender, EventArgs e)
 {
     if (common_file.common_roles.get_user_qx("B_hygl__jfdh", common_file.common_app.user_type) == false)
     {
         return;
     }
     if (Hhygl_id != "" && hykh != "")
     {
         Hhygl.Hhygl_jfdf Hhygl_jfdf_new = new Hhygl_jfdf();
         Hhygl_jfdf_new.StartPosition = FormStartPosition.CenterScreen;
         Hhygl_jfdf_new.hykh          = hykh;
         Hhygl_jfdf_new.ShowDialog();
     }
     Cursor.Current = Cursors.Default;
 }
Пример #2
0
        private void b_jfdf_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (dg_count > 0 && dg_hygl.Rows[0].Cells["id"].Value != null && dg_hygl.Rows[0].Cells["id"].Value.ToString() != string.Empty)
            {
                int i = dg_hygl.CurrentRow.Index;
                if (i > -1 && i < dg_count)//当前行为内容行
                {
                    int id = Convert.ToInt32(dg_hygl.Rows[i].Cells["id"].Value);

                    DataRowView dgr = dg_hygl.CurrentRow.DataBoundItem as DataRowView;
                    i = DS_Hygl.Tables[0].Rows.IndexOf(dgr.Row);

                    Hhygl.Hhygl_jfdf Hhygl_jfdf_new = new Hhygl_jfdf(this);
                    Hhygl_jfdf_new.StartPosition = FormStartPosition.CenterScreen;
                    // Hhygl_jfdf_new.tB_hykh.Text = DS_Hygl.Tables[0].Rows[i]["hykh"].ToString();
                    Hhygl_jfdf_new.hykh = DS_Hygl.Tables[0].Rows[i]["hykh"].ToString();
                    Hhygl_jfdf_new.ShowDialog();
                }
            }
            Cursor.Current = Cursors.Default;
        }