Exemple #1
0
        /// <summary>
        /// 新增数据操作
        /// </summary>
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            FrmEditAddressGroup dlg = new FrmEditAddressGroup();

            dlg.addressType  = this.AddressType;
            dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved);
            dlg.InitFunction(LoginUserInfo, FunctionDict);//给子窗体赋值用户权限信息

            if (DialogResult.OK == dlg.ShowDialog())
            {
                BindData();
            }
        }
Exemple #2
0
        /// <summary>
        /// 分页控件编辑项操作
        /// </summary>
        private void winGridViewPager1_OnEditSelected(object sender, EventArgs e)
        {
            if (AddressType.个人 == AddressType && !HasFunction("PersonalAddress/GroupEdit"))
            {
                MessageDxUtil.ShowError(Const.NoAuthMsg);
                return;
            }
            if (AddressType.公司 == AddressType && !HasFunction("CommonAddress/GroupEdit"))
            {
                MessageDxUtil.ShowError(Const.NoAuthMsg);
                return;
            }

            Int32        Id     = this.winGridViewPager1.gridView1.GetFocusedRowCellDisplayText("ID").ToInt32();
            List <Int32> IdList = new List <Int32>();

            for (int i = 0; i < this.winGridViewPager1.gridView1.RowCount; i++)
            {
                Int32 intTemp = this.winGridViewPager1.GridView1.GetRowCellDisplayText(i, "ID").ToInt32();
                IdList.Add(intTemp);
            }

            if (Id > 0)
            {
                FrmEditAddressGroup dlg = new FrmEditAddressGroup();
                dlg.addressType  = this.AddressType;
                dlg.Id           = Id;
                dlg.IdList       = IdList;
                dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved);
                dlg.InitFunction(LoginUserInfo, FunctionDict);//给子窗体赋值用户权限信息

                if (DialogResult.OK == dlg.ShowDialog())
                {
                    BindData();
                }
            }
        }
Exemple #3
0
        /// <summary>
        /// 分页控件编辑项操作
        /// </summary>
        private void winGridViewPager1_OnEditSelected(object sender, EventArgs e)
        {
            if (AddressType.个人 == AddressType && !HasFunction("PersonalAddress/GroupEdit"))
            {
                MessageDxUtil.ShowError(Const.NoAuthMsg);
                return;
            }
            if (AddressType.公共 == AddressType && !HasFunction("CommonAddress/GroupEdit"))
            {
                MessageDxUtil.ShowError(Const.NoAuthMsg);
                return;
            }

            string        ID     = this.winGridViewPager1.gridView1.GetFocusedRowCellDisplayText("ID");
            List <string> IDList = new List <string>();

            for (int i = 0; i < this.winGridViewPager1.gridView1.RowCount; i++)
            {
                string strTemp = this.winGridViewPager1.GridView1.GetRowCellDisplayText(i, "ID");
                IDList.Add(strTemp);
            }

            if (!string.IsNullOrEmpty(ID))
            {
                FrmEditAddressGroup dlg = new FrmEditAddressGroup();
                dlg.AddressType  = this.AddressType;
                dlg.ID           = ID;
                dlg.IDList       = IDList;
                dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved);
                dlg.InitFunction(LoginUserInfo, FunctionDict);//给子窗体赋值用户权限信息

                if (DialogResult.OK == dlg.ShowDialog())
                {
                    BindData();
                }
            }
        }