Beispiel #1
0
        private void b_amend_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (dg_xydwkrly.CurrentRow != null)
            {
                int i = dg_xydwkrly.CurrentRow.Index;

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

                if (DS_xydw_krly.Tables[0].Rows[i]["id"].ToString() != "")
                {
                    Yyxzx.Yxydw_fjrb_add_edit Yxydw_fjrb_add_edit_new = new Yxydw_fjrb_add_edit(this);
                    Yxydw_fjrb_add_edit_new.StartPosition  = FormStartPosition.CenterScreen;
                    Yxydw_fjrb_add_edit_new.judge_add_edit = common_file.common_app.get_edit;
                    Yxydw_fjrb_add_edit_new.Hhyfj_id       = DS_xydw_krly.Tables[0].Rows[i]["id"].ToString();
                    Yxydw_fjrb_add_edit_new.tB_fjrb.Text   = DS_xydw_krly.Tables[0].Rows[i]["fjrb"].ToString();
                    Yxydw_fjrb_add_edit_new.tB_hyfj.Text   = DS_xydw_krly.Tables[0].Rows[i]["sjjg"].ToString();
                    Yxydw_fjrb_add_edit_new.tB_xydw.Text   = DS_xydw_krly.Tables[0].Rows[i]["xydw"].ToString();
                    Yxydw_fjrb_add_edit_new.xyh            = DS_xydw_krly.Tables[0].Rows[i]["xyh"].ToString();
                    Yxydw_fjrb_add_edit_new.fjrb_code      = DS_xydw_krly.Tables[0].Rows[i]["fjrb_code"].ToString();
                    Yxydw_fjrb_add_edit_new.ShowDialog();
                }
            }
            Cursor.Current = Cursors.Default;
        }
Beispiel #2
0
 private void b_new_Click(object sender, EventArgs e)
 {
     common_file.common_app.get_czsj();
     Yyxzx.Yxydw_fjrb_add_edit Yxydw_fjrb_add_edit_new = new Yxydw_fjrb_add_edit(this);
     Yxydw_fjrb_add_edit_new.StartPosition = FormStartPosition.CenterScreen;
     Yxydw_fjrb_add_edit_new.ShowDialog();
     Cursor.Current = Cursors.Default;
 }
Beispiel #3
0
        private void bt_xyfj_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (common_file.common_roles.get_user_qx("B_xydwgl_szfj", common_file.common_app.user_type) == false)
            {
                return;
            }

            if (DS_Yxydw != null && DS_Yxydw.Tables[0].Rows.Count > 0)
            {
                if (common_file.common_app.message_box_show_select(common_file.common_app.message_title, "是否要设置所选协议单位的房价!") == true)
                {
                    int j = 0; string s = "";
                    for (int i = 0; i < dg_count; i++)
                    {
                        common_file.common_app.get_czsj();
                        DataGridViewDataErrorContexts ss = new DataGridViewDataErrorContexts();
                        if (this.dg_xydw.Rows[i].Cells[0].GetEditedFormattedValue(i, ss) != null && Convert.ToBoolean(this.dg_xydw.Rows[i].Cells[0].GetEditedFormattedValue(i, ss)) == true)
                        {
                            //j = Convert.ToInt32(dg_xydw.Rows[i].Index.ToString());

                            DataRowView dgr = dg_xydw.Rows[i].DataBoundItem as DataRowView;
                            i = DS_Yxydw.Tables[0].Rows.IndexOf(dgr.Row);



                            if (DS_Yxydw.Tables[0].Rows[i]["id"].ToString() != "")
                            {
                                int strid = int.Parse(DS_Yxydw.Tables[0].Rows[i]["id"].ToString());
                                Yyxzx.Yxydw_fjrb_add_edit Yxydw_fjrb_add_edit_new = new Yxydw_fjrb_add_edit(this);
                                Yxydw_fjrb_add_edit_new.xyh           = DS_Yxydw.Tables[0].Rows[i]["xyh"].ToString();
                                Yxydw_fjrb_add_edit_new.tB_xydw.Text  = DS_Yxydw.Tables[0].Rows[i]["xydw"].ToString();
                                Yxydw_fjrb_add_edit_new.StartPosition = FormStartPosition.CenterScreen;
                                Yxydw_fjrb_add_edit_new.ShowDialog();
                            }
                        }
                    }
                    ;
                }
            }
            Cursor.Current = Cursors.Default;
        }