示例#1
0
 private void b_new_Click(object sender, EventArgs e)
 {
     common_file.common_app.get_czsj();
     Xxtsz.Xxfmx_zbmx_add_edit Xxfmx_zbmx_add_edit_new = new Xxfmx_zbmx_add_edit(this);
     Xxfmx_zbmx_add_edit_new.lsbh          = strlsbh;
     Xxfmx_zbmx_add_edit_new.StartPosition = FormStartPosition.CenterScreen;
     Xxfmx_zbmx_add_edit_new.ShowDialog();
     Cursor.Current = Cursors.Default;
 }
示例#2
0
        private void b_amend_Click(object sender, EventArgs e)
        {
            if (dg_xfmx_lkmx.CurrentRow != null)
            {
                int i = dg_xfmx_lkmx.CurrentRow.Index;
                if (DS_Xxfmx.Tables[0].Rows[i]["id"].ToString() != "")
                {
                    Xxtsz.Xxfmx_zbmx_add_edit Xxfmx_zbmx_add_edit_new = new Xxfmx_zbmx_add_edit(this);
                    //id, yydh, qymc, lsbh, lksj, czsj, czy, bz,
                    //drbh, xfdr, xrbh,xfxr,xfmx, mxbh, xfsl, add_edit_delete, xxzs
                    Xxfmx_zbmx_add_edit_new.StartPosition  = FormStartPosition.CenterScreen;
                    Xxfmx_zbmx_add_edit_new.judge_add_edit = common_file.common_app.get_edit;

                    string strlsbhzd = DS_Xxfmx.Tables[0].Rows[i]["lsbh"].ToString();
                    Xxfmx_zbmx_add_edit_new.Xxfxr_id = DS_Xxfmx.Tables[0].Rows[i]["id"].ToString();

                    Xxfmx_zbmx_add_edit_new.tB_xfrb.Text = DS_Xxfmx.Tables[0].Rows[i]["xfxr"].ToString();
                    Xxfmx_zbmx_add_edit_new.tB_xfxm.Text = DS_Xxfmx.Tables[0].Rows[i]["xfmx"].ToString();


                    if (Getshsh(strlsbhzd))
                    {
                        Xxfmx_zbmx_add_edit_new.tB_xfsl.Enabled = false;
                        Xxfmx_zbmx_add_edit_new.b_save.Enabled  = false;
                    }
                    Xxfmx_zbmx_add_edit_new.lsbh         = strlsbhzd;
                    Xxfmx_zbmx_add_edit_new.xrbh         = DS_Xxfmx.Tables[0].Rows[i]["xrbh"].ToString();
                    Xxfmx_zbmx_add_edit_new.drbh         = DS_Xxfmx.Tables[0].Rows[i]["drbh"].ToString();
                    Xxfmx_zbmx_add_edit_new.xfdr         = DS_Xxfmx.Tables[0].Rows[i]["xfdr"].ToString();
                    Xxfmx_zbmx_add_edit_new.mxbh         = DS_Xxfmx.Tables[0].Rows[i]["mxbh"].ToString();
                    Xxfmx_zbmx_add_edit_new.xftm         = DS_Xxfmx.Tables[0].Rows[i]["xftm"].ToString();
                    Xxfmx_zbmx_add_edit_new.tB_xftm.Text = DS_Xxfmx.Tables[0].Rows[i]["xftm"].ToString();
                    Xxfmx_zbmx_add_edit_new.tB_mxbh.Text = DS_Xxfmx.Tables[0].Rows[i]["mxbh"].ToString();


                    //判断下主单是否审核,如果审核了就不能修改
                    Xxfmx_zbmx_add_edit_new.tB_xfsl.Text            = DS_Xxfmx.Tables[0].Rows[i]["zb_sl"].ToString();
                    Xxfmx_zbmx_add_edit_new.b_xslb.Visible          = false;
                    Xxfmx_zbmx_add_edit_new.btn_xfmx_select.Visible = false;

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