예제 #1
0
        private void b_new_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (common_file.common_roles.get_user_qx("B_xfxm_xz", common_file.common_app.user_type) == false)
            {
                return;
            }
            Xxtsz.Xxfmx_add_edit Xxfmx_add_edit_new = new Xxfmx_add_edit(this);

            Xxfmx_add_edit_new.StartPosition  = FormStartPosition.CenterScreen;
            Xxfmx_add_edit_new.judge_add_edit = common_file.common_app.get_add;
            Xxfmx_add_edit_new.ShowDialog();
            Cursor.Current = Cursors.Default;
        }
예제 #2
0
        private void b_amend_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (common_file.common_roles.get_user_qx("B_xfxm__xg", common_file.common_app.user_type) == false)
            {
                return;
            }
            if (dg_xfmx.CurrentRow != null)
            {
                int         i   = dg_xfmx.CurrentRow.Index;
                DataRowView dgr = dg_xfmx.Rows[i].DataBoundItem as DataRowView;
                i = DS_Xxfmx.Tables[0].Rows.IndexOf(dgr.Row);


                if (DS_Xxfmx.Tables[0].Rows[i]["id"].ToString() != "")
                {
                    Xxtsz.Xxfmx_add_edit Xxfmx_add_edit_new = new Xxfmx_add_edit(this);

                    Xxfmx_add_edit_new.StartPosition  = FormStartPosition.CenterScreen;
                    Xxfmx_add_edit_new.judge_add_edit = common_file.common_app.get_edit;
                    Xxfmx_add_edit_new.Xxfxr_id       = DS_Xxfmx.Tables[0].Rows[i]["id"].ToString();
                    Xxfmx_add_edit_new.tB_mxbh.Text   = DS_Xxfmx.Tables[0].Rows[i]["mxbh"].ToString();
                    Xxfmx_add_edit_new.tB_xfxr.Text   = DS_Xxfmx.Tables[0].Rows[i]["xfxr"].ToString();
                    Xxfmx_add_edit_new.tB_xfje.Text   = DS_Xxfmx.Tables[0].Rows[i]["xfje"].ToString();
                    Xxfmx_add_edit_new.tB_xfdr.Text   = DS_Xxfmx.Tables[0].Rows[i]["xfdr"].ToString();
                    Xxfmx_add_edit_new.tB_xfmx.Text   = DS_Xxfmx.Tables[0].Rows[i]["xfmx"].ToString();
                    Xxfmx_add_edit_new.tB_zjm.Text    = DS_Xxfmx.Tables[0].Rows[i]["zjm"].ToString();

                    Xxfmx_add_edit_new.tB_xfjl.Text = DS_Xxfmx.Tables[0].Rows[i]["jldw"].ToString();
                    Xxfmx_add_edit_new.tB_xftm.Text = DS_Xxfmx.Tables[0].Rows[i]["xftm"].ToString();
                    Xxfmx_add_edit_new.tB_xfgg.Text = DS_Xxfmx.Tables[0].Rows[i]["xfgg"].ToString();
                    Xxfmx_add_edit_new.tB_xfcd.Text = DS_Xxfmx.Tables[0].Rows[i]["xf_cd"].ToString();
                    Xxfmx_add_edit_new.tB_jjje.Text = DS_Xxfmx.Tables[0].Rows[i]["jjje"].ToString();
                    Xxfmx_add_edit_new.tB_xfdw.Text = DS_Xxfmx.Tables[0].Rows[i]["xf_dw"].ToString();
                    Xxfmx_add_edit_new.tB_kcsl.Text = DS_Xxfmx.Tables[0].Rows[i]["kcsl"].ToString();
                    if (DS_Xxfmx.Tables[0].Rows[i]["is_tj_kc"].ToString() != null && DS_Xxfmx.Tables[0].Rows[i]["is_tj_kc"].ToString() != "")
                    {
                        Xxfmx_add_edit_new.Cb_is_tj_kc.Checked = Convert.ToBoolean(DS_Xxfmx.Tables[0].Rows[i]["is_tj_kc"].ToString());
                    }

                    Xxfmx_add_edit_new.ShowDialog();
                }
                Cursor.Current = Cursors.Default;
            }
        }