示例#1
0
        public frmObjectSearch(string proj)
            : this()
        {
            mProj = new TB_PROJECT();
            List <PTS_TABLE_SRC> srclist = new List <PTS_TABLE_SRC>();
            PTS_TABLE_SRC        tmp     = new PTS_TABLE_SRC();

            tmp.TABLE_NAME  = "请选择";
            tmp.TABLE_VALUE = "0";
            tmp.ID          = 0;
            PTS_TABLE_SRC[] arr = PTS_TABLE_SRCDAO.FindAll(new EqExpression("TABLE_ID", "PTS_TABLE_OBJECT_TYPE"));
            if (arr.Length > 0)
            {
                srclist = new List <PTS_TABLE_SRC>(arr);
                srclist.Insert(0, tmp);
            }
            this.cmbObjType.ItemsSource       = null;
            this.cmbObjType.ItemsSource       = srclist;
            this.cmbObjType.DisplayMemberPath = "TABLE_NAME";
            this.cmbObjType.SelectedIndex     = 0;
            this.txtObjName.Text = proj;
            TB_PROJECT[] _arr = TB_PROJECTDAO.FindAll(new LikeExpression("OBJECTNAME", "%" + this.txtObjName.Text + "%"), new EqExpression("STATUS", 1));
            if (_arr.Length > 0)
            {
                mList = new List <TB_PROJECT>(_arr);
            }
            this.dgObject.ItemsSource = screening(mList);
        }
示例#2
0
 private PTS_TABLE_SRC getUserRole(int ROLEID = -1)
 {
     try
     {
         PTS_TABLE_SRC item = PTS_TABLE_SRCDAO.FindFirst(new EqExpression("ID", ROLEID));
         return(item);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#3
0
        private void BindSourceData()
        {
            List <PTS_TABLE_SRC> list = null;

            PTS_TABLE_SRC[] arr = PTS_TABLE_SRCDAO.FindAll(new EqExpression("STATUS", 1), new EqExpression("TABLE_ID", "PTS_TABLE_OBJECT_TYPE"));
            if (arr.Length > 0)
            {
                list = new List <PTS_TABLE_SRC>(arr);
                PTS_TABLE_SRC _tmp = new PTS_TABLE_SRC();
                _tmp.TABLE_NAME = "请选择";
                list.Insert(0, _tmp);
            }
            this.cmbObjType.ItemsSource       = null;
            this.cmbObjType.ItemsSource       = list;
            this.cmbObjType.DisplayMemberPath = "TABLE_NAME";
            this.cmbObjType.SelectedIndex     = 0;
        }
示例#4
0
        public frmObjectSearch(int type = 0)
        {
            InitializeComponent();
            mType = type;
            mProj = new TB_PROJECT();
            List <PTS_TABLE_SRC> srclist = new List <PTS_TABLE_SRC>();
            PTS_TABLE_SRC        tmp     = new PTS_TABLE_SRC();

            tmp.TABLE_NAME  = "请选择";
            tmp.TABLE_VALUE = "0";
            tmp.ID          = 0;
            PTS_TABLE_SRC[] arr = PTS_TABLE_SRCDAO.FindAll(new EqExpression("TABLE_ID", "PTS_TABLE_OBJECT_TYPE"));
            if (arr.Length > 0)
            {
                srclist = new List <PTS_TABLE_SRC>(arr);
                srclist.Insert(0, tmp);
            }
            this.cmbObjType.ItemsSource       = null;
            this.cmbObjType.ItemsSource       = srclist;
            this.cmbObjType.DisplayMemberPath = "TABLE_NAME";
            this.cmbObjType.SelectedIndex     = 0;
            TB_PROJECT[] _arr = null;
            //if(type==1)
            //    _arr = TB_PROJECTDAO.FindAll(new LikeExpression("OBJECTNAME", "%" + this.txtObjName.Text + "%"), new EqExpression("STATUS", 1), new NotExpression(new EqExpression("BILLSTATUS", "已结算")));
            //else
            _arr = TB_PROJECTDAO.FindAll(new LikeExpression("OBJECTNAME", "%" + this.txtObjName.Text + "%"), new EqExpression("STATUS", 1));

            if (_arr.Length > 0)
            {
                mList = new List <TB_PROJECT>(_arr);
                for (int i = 0; i < mList.Count; i++)
                {
                    if (!string.IsNullOrEmpty(mList[i].OBJECTTYPENAME))
                    {
                        string identity = Comment.setProjIdentity(mList[i].OBJECTTYPENAME);
                        mList[i].ProjIdentity = identity;
                    }
                }
                if (type == 1)
                {
                    mList = mList.FindAll(a => a.BILLSTATUS == "已结算");
                }
            }
            this.dgObject.ItemsSource = screening(mList);
        }
示例#5
0
        private void BindStaticData()
        {
            //获取静态报销类型数据
            this.cmbExprenseItem.ItemsSource = null;
            PTS_TABLE_SRC tmp = new PTS_TABLE_SRC();

            tmp.TABLE_NAME  = "请选择";
            tmp.TABLE_VALUE = "0";
            PTS_TABLE_SRC[] arr = PTS_TABLE_SRCDAO.FindAll(new EqExpression("TABLE_ID", "PTS_TABLE_EXPENSE_ITEM"), new EqExpression("STATUS", 1));
            if (arr.Length > 0)
            {
                mList = new List <PTS_TABLE_SRC>(arr);
                mList.Insert(0, tmp);
            }

            this.cmbExprenseItem.ItemsSource       = mList;
            this.cmbExprenseItem.DisplayMemberPath = "TABLE_NAME";
            this.cmbExprenseItem.SelectedIndex     = 0;
        }
示例#6
0
        private void BindDataSource()
        {
            //报销类型
            List <PTS_TABLE_SRC> src_list = null;

            PTS_TABLE_SRC[] src_arr = PTS_TABLE_SRCDAO.FindAll(new EqExpression("TABLE_ID", "PTS_TABLE_EXPENSE_ITEM"));  //没有过滤status=0
            if (src_arr.Length > 0)
            {
                src_list = new List <PTS_TABLE_SRC>(src_arr);
                PTS_TABLE_SRC tmp = new PTS_TABLE_SRC();
                tmp.TABLE_NAME = "请选择";
                tmp.ID         = 0;
                src_list.Insert(0, tmp);
            }
            this.cmbExpenseType.ItemsSource       = null;
            this.cmbExpenseType.ItemsSource       = src_list;
            this.cmbExpenseType.DisplayMemberPath = "TABLE_NAME";
            this.cmbExpenseType.SelectedIndex     = 0;
        }
示例#7
0
 public frmUser()
 {
     InitializeComponent();
     #region  获取静态角色数据
     this.cmbUserRole.ItemsSource = null;
     PTS_TABLE_SRC tmp = new PTS_TABLE_SRC();
     tmp.TABLE_NAME  = "请选择";
     tmp.TABLE_VALUE = "0";
     PTS_TABLE_SRC[]      arr  = PTS_TABLE_SRCDAO.FindAll(new EqExpression("STATUS", 1), new EqExpression("TABLE_ID", "PTS_TABLE_USER_ROLE"));
     List <PTS_TABLE_SRC> list = new List <PTS_TABLE_SRC>();
     if (arr.Length > 0)
     {
         list = new List <PTS_TABLE_SRC>(arr);
         list.Insert(0, tmp);
     }
     this.cmbUserRole.ItemsSource       = list;
     this.cmbUserRole.DisplayMemberPath = "TABLE_NAME";
     this.cmbUserRole.SelectedIndex     = 0;
     #endregion
     bindUserData();
 }