Esempio n. 1
0
        private void Modify(int rowHandle)
        {
            if (rowHandle < 0)
            {
                return;
            }

            //权限检查
            //string s_right = Tools.GetRight(Envior.cur_userId, AC077 == "1" ? "01020" : "07020");
            //if (s_right == "0" || (s_right == "1" && gridView1.GetRowCellValue(rowHandle, "AC100").ToString() != Envior.cur_userId))
            //{
            //    MessageBox.Show("权限不足!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            //}

            Frm_ac01 frm_ac01 = new Frm_ac01();

            frm_ac01.swapdata["action"]         = "edit";
            frm_ac01.swapdata["dataset"]        = this.ac01_ds;
            frm_ac01.swapdata["businessObject"] = this;

            string s_ac001 = gridView1.GetRowCellValue(rowHandle, "AC001").ToString();

            frm_ac01.swapdata["AC001"] = s_ac001;

            if (frm_ac01.ShowDialog() == DialogResult.OK)
            {
                frm_ac01.Dispose();
                adapter.SelectCommand.CommandText = "select * from ac01 where ac001='" + s_ac001 + "'";
                adapter.Fill(shadow_dt);
                ac01_ds.Ac01.Merge(this.shadow_dt);
            }
        }
Esempio n. 2
0
        private void BarButtonItem3_ItemClick(object sender, ItemClickEventArgs e)
        {
            Frm_ac01 frm_ac01 = new Frm_ac01();

            frm_ac01.swapdata["action"] = "add";

            Ac01_ds ac01_ds = new Ac01_ds();

            frm_ac01.swapdata["dataset"] = ac01_ds;

            frm_ac01.ShowDialog();
            frm_ac01.Dispose();
        }
Esempio n. 3
0
        /// <summary>
        /// 进灵登记-新增
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BarButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Frm_ac01 frm_ac01 = new Frm_ac01();

            frm_ac01.swapdata["action"]         = "add";
            frm_ac01.swapdata["dataset"]        = this.ac01_ds;
            frm_ac01.swapdata["businessObject"] = this;

            if (frm_ac01.ShowDialog() == DialogResult.OK)
            {
                string s_ac001 = this.swapdata["AC001"].ToString();

                adapter.SelectCommand.CommandText = "select * from ac01 where ac001='" + s_ac001 + "'";
                adapter.Fill(this.shadow_dt);
                ac01_ds.Ac01.Merge(this.shadow_dt);
            }
        }