/// <summary>
        /// 搜索
        /// </summary>
        /// <param name="frmBaseToolXC"></param>
        protected override void SetSearchProc(frmSearchBasic2 frmBaseToolXC)
        {
            if ((dateOperDate1.EditValue == null || string.IsNullOrEmpty(dateOperDate1.EditValue.ToString())))
            {
                DataValid.ShowErrorInfo(this.ErrorInfo, this.dateOperDate1, "请选择开始时间!");
                return;
            }
            if ((dateOperDate2.EditValue == null || string.IsNullOrEmpty(dateOperDate2.EditValue.ToString())))
            {
                DataValid.ShowErrorInfo(this.ErrorInfo, this.dateOperDate2, "请选择结束时间!");
                return;
            }
             
            dtBegin = DateTime.Parse(dateOperDate1.EditValue.ToString());
            dtEnd = DateTime.Parse(dateOperDate2.EditValue.ToString());
             if (dtEnd < dtBegin)
                {
                    DataValid.ShowErrorInfo(this.ErrorInfo, this.dateOperDate2, "结束时间须大于开始时间!");
                    return;
                }
              

            base.SetSearchProc(frmBaseToolXC);
            //GetDspDataList();
        }
Example #2
0
 protected override void SetSearchProc(frmSearchBasic2 frmBaseToolXC)
 {
     
    // base.SetSearchProc(frmBaseToolXC);
     //XtraMsgBox.Show("Search!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
     searchByConditions();
 }
Example #3
0
        protected override void SetSearchProc(frmSearchBasic2 frmBaseToolXC)
        {
            base.SetSearchProc(frmBaseToolXC);

            GetDspDataList();

            SetButtonEnabled();
        }
Example #4
0
        /// <summary>
        /// 搜索
        /// </summary>
        /// <param name="frmBaseToolXC"></param>
        protected override void SetSearchProc(frmSearchBasic2 frmBaseToolXC)
        {
            base.SetSearchProc(frmBaseToolXC);

            //GetDspDataList();
        }
Example #5
0
        /// <summary>
        /// 检索
        /// </summary>
        /// <param name="isClear"></param>
        protected override void SetSearchProc(frmSearchBasic2 frmBaseToolXC)
        {
            base.SetSearchProc(frmBaseToolXC);
            if ((dateBeginDate.EditValue == null || dateBeginDate.EditValue.ToString() == "") && (dateEndDate.EditValue != null || dateEndDate.EditValue.ToString() != ""))
            {
                DataValid.ShowErrorInfo(this.ErrorInfo, this.dateBeginDate, "请选择开始时间!");
                return;
            }
            if ((dateBeginDate.EditValue != null || dateBeginDate.EditValue.ToString() != "") && (dateEndDate.EditValue == null || dateEndDate.EditValue.ToString() == ""))
            {
                DataValid.ShowErrorInfo(this.ErrorInfo, this.dateEndDate, "请选择结束时间!");
                return;
            }
            if ((dateBeginDate.EditValue != null && dateBeginDate.EditValue.ToString() != "") && (dateEndDate.EditValue != null && dateEndDate.EditValue.ToString() != ""))
            {

                dtBegin = DateTime.Parse(dateBeginDate.EditValue.ToString());
                dtEnd = DateTime.Parse(dateEndDate.EditValue.ToString());

                if (dtEnd < dtBegin)
                {
                    DataValid.ShowErrorInfo(this.ErrorInfo, this.dateEndDate, "请选择开始时间小于结束时间!");
                    return;
                }
            }

        }
Example #6
0
 protected override void SetSearchProc(frmSearchBasic2 frmBaseToolXC)
 {
     loadData(this.txtDeptName.Text.Trim());
 }
Example #7
0
 protected override void SetSearchProc(frmSearchBasic2 frmBaseToolXC)
 {
     base.SetSearchProc(frmBaseToolXC);
 }
Example #8
0
        /// <summary>
        /// 处理数据功能处理
        /// </summary>
        protected virtual void SetSaveDataProc(frmSearchBasic2 frmbase)
        {
            bool isSucces = false;
            int RtnValue = -1;

            //画面数据验证处理
            if (!this.validData.Validate())
            {
                return;
            }

            //获取需要编辑数据信息
            this.GetGrpDataItem();

            //数据检查功能处理
            this.GetInputCheck(ref isSucces);

            if (!isSucces)
            {
                return;
            }
            switch (frmbase.ScanMode)
            {

                case Common.DataModifyMode.add:
                    SetInsertProc(ref RtnValue);
                    break;

                case Common.DataModifyMode.upd:
                    SetModifyProc(ref RtnValue);
                    break;

                case Common.DataModifyMode.del:

                    if (XtraMsgBox.Show("确定要删除吗(Y/N)?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;

                    SetDeleteProc(ref RtnValue);

                    break;

                default:
                    this.ScanMode = Common.DataModifyMode.dsp;
                    break;

            }

            //数据刷新功能处理
            if (RtnValue > 0)
            {
                this.ScanMode = Common.DataModifyMode.dsp;

                SetRefreshProc(this);
                SetCancelInit(true);
            }
            //获取表格一览信息
            this.GetDspDataList();

        }
Example #9
0
        /// <summary>
        /// 设定工具栏的有效性
        /// </summary>
        /// <param name="mode">编辑的状态</param>
        public static void SetCmdControl(frmSearchBasic2 frmbase)
        {

            int RecordCount = 0;

            if (frmbase.m_GridViewUtil != null
                 && frmbase.m_GridViewUtil.ParentGridView != null
                 && frmbase.m_GridViewUtil.ParentGridView.RowCount > 0)
            {
                RecordCount = frmbase.m_GridViewUtil.ParentGridView.RowCount;
            }

            //初始化状态
            //frmbase.SearchButtonEnabled = true;
            //frmbase.CopyAddVisibility = false;
            //frmbase.CopyAddEnabled = false;

            switch (frmbase.ScanMode)
            {

                case Common.DataModifyMode.dsp:

                    //初始化状态
                    frmbase.NewButtonEnabled = true;
                    frmbase.SaveButtonEnabled = false;
                    frmbase.CancelButtonEnabled = false;
                    frmbase.SearchButtonEnabled = true;
                    frmbase.ImportButtonEnabled = true;
                    if (RecordCount > 0)
                    {
                        frmbase.PrintButtonEnabled = true;
                        frmbase.ExcelButtonEnabled = true;
                        frmbase.DeleteButtonEnabled = true;
                        frmbase.EditButtonEnabled = true;
                        frmbase.CopyAddEnabled = true;
                        frmbase.SelectAllButtonEnabled = true;
                        frmbase.SelectOffButtonEnabled = true;
                    }
                    else
                    {
                        frmbase.PrintButtonEnabled = false;
                        frmbase.ExcelButtonEnabled = false;
                        frmbase.DeleteButtonEnabled = false;
                        frmbase.EditButtonEnabled = false;
                        frmbase.CopyAddEnabled = false;
                        frmbase.SelectAllButtonEnabled = false;
                        frmbase.SelectOffButtonEnabled = false;
                    }
                    break;

                case Common.DataModifyMode.add:

                    //添加状态
                    frmbase.NewButtonEnabled = false;
                    frmbase.PrintButtonEnabled = false;
                    frmbase.ImportButtonEnabled = false;
                    frmbase.SaveButtonEnabled = true;
                    frmbase.ExcelButtonEnabled = false;
                    frmbase.SearchButtonEnabled = false;
                    frmbase.EditButtonEnabled = false;
                    frmbase.DeleteButtonEnabled = false;
                    frmbase.CancelButtonEnabled = true;
                    break;

                case Common.DataModifyMode.upd:

                    //修改状态
                    frmbase.NewButtonEnabled = false;
                    frmbase.PrintButtonEnabled = false;
                    frmbase.ImportButtonEnabled = false;
                    frmbase.SaveButtonEnabled = true;
                    frmbase.ExcelButtonEnabled = false;
                    frmbase.SearchButtonEnabled = false;
                    frmbase.EditButtonEnabled = false;
                    frmbase.DeleteButtonEnabled = false;
                    frmbase.CancelButtonEnabled = true;

                    break;

                case Common.DataModifyMode.del:

                    //删除状态
                    frmbase.NewButtonEnabled = false;
                    frmbase.PrintButtonEnabled = false;
                    frmbase.ImportButtonEnabled = false;
                    frmbase.SaveButtonEnabled = true;
                    frmbase.ExcelButtonEnabled = false;
                    frmbase.SearchButtonEnabled = false;
                    frmbase.EditButtonEnabled = false;
                    frmbase.DeleteButtonEnabled = false;
                    frmbase.CopyAddEnabled = false;
                    frmbase.CancelButtonEnabled = true;

                    break;


            }

            if (Common._isHistory)
            {
                frmbase.cmdSave.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                frmbase.cmdSelectAll .Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                frmbase.cmdSelectOff.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;

            }
        }
Example #10
0
        /// <summary>
        /// 数据查询功能处理
        /// </summary>
        protected virtual void SetSearchProc(frmSearchBasic2 frmBaseToolXC)
        {

            try
            {
                this.m_dicItemData.Clear ();

                //获取表格一览信息
                GetDspDataList();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #11
0
        /// <summary>
        /// 数据刷新功能处理
        /// </summary>
        protected virtual void SetRefreshProc(frmSearchBasic2 frmBaseToolXC)
        {

            try
            {
                //获取表格一览信息
                GetDspDataList();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected override void SetSaveDataProc(frmSearchBasic2 frmbase)
        {
            //base.SetSaveDataProc(frmbase);
            if (!string.IsNullOrEmpty(FocusedRoleId))
            {
                List<TreeListNode> changedNodes = new List<TreeListNode>();
                foreach (TreeListNode node in funcsTreeList.Nodes)
                {
                    GetChangedNodes(node, ref changedNodes);
                }

                if (changedNodes.Count > 0)
                {

                    foreach (TreeListNode node in changedNodes)
                    {
                        m_dicItemData = new StringDictionary();
                        m_dicItemData["RoleID"] = FocusedRoleId;
                        m_dicItemData["pFromName"] = (string)node.GetValue("pFromName");
                        int effcCnt1 = SysParam.m_daoCommon.SetDeleteDataItem("Oper_Role_Permissions", m_dicItemData, m_dicItemData);
                        if (node.CheckState == CheckState.Unchecked)
                        {
                            node.Tag = CheckState.Unchecked;
                        }
                        if(node.CheckState  == CheckState.Checked){
                            int effcCnt2 = SysParam.m_daoCommon.SetInsertDataItem("Oper_Role_Permissions", m_dicItemData);
                            if (effcCnt2>0)
                            {
                                node.Tag = CheckState.Checked;
                            }
                        }
                        
                    }

                }
                XtraMsgBox.Show("保存角色权限成功!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
        
            }

           
        }