Ejemplo n.º 1
0
        void OrderEntity_OrderPropertyChanged(object sender, OrderPropertyChangedArgs e)
        {
            T_FB_DEPTTRANSFERMASTER entity = this.OrderEntity.Entity as T_FB_DEPTTRANSFERMASTER;

            if (e.Result.Contains("Entity.TRANSFERFROM"))
            {
                if (entity.TRANSFERFROMTYPE.Equal(3)) // 个人
                {
                    EmployeerData ed = (entity.FromObject as EmployeerData);
                    entity.OWNERID           = ed.Value.ToString();
                    entity.OWNERNAME         = ed.Text;
                    entity.OWNERDEPARTMENTID = ed.Department.Value.ToString();
                    entity.OWNERPOSTID       = ed.Post.Value.ToString();
                    entity.OWNERPOSTNAME     = ed.Post.Text.ToString();
                }
                else if (entity.TRANSFERFROMTYPE.Equal(2)) // 部门 
                {
                    entity.OWNERDEPARTMENTID = entity.TRANSFERFROM;
                    //entity.OWNERDEPARTMENTNAME = dd.Text;
                    //entity.OWNERCOMPANYID = dd.Company.Value.to
                    ChangeOwnerID();
                }
                else
                {
                    // 清除预算明细
                    this.OrderEntity.GetRelationFBEntities(typeof(T_FB_DEPTTRANSFERDETAIL).Name).Clear();

                    CommonFunction.ShowMessage("调出单位必须是个人或部门");
                }

                GetOrderDetail();
                ChangeCreator();
            }
            //else if (e.Result.Contains("Entity.ToObject"))
            //{
            //    if (!entity.TRANSFERTOTYPE.Equal(3) && !entity.TRANSFERTOTYPE.Equal(2)) // 个人
            //    {
            //        CommonFunction.ShowMessage("调入单位必须是个人或部门");
            //    }
            //}
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取T_FB_DEPTTRANSFERMASTER信息
        /// </summary>
        /// <param name="strDeptTransferMasterId">主键索引</param>
        /// <returns></returns>
        public T_FB_DEPTTRANSFERMASTER GetDeptTransferMasterByID(string strDeptTransferMasterId)
        {
            if (string.IsNullOrEmpty(strDeptTransferMasterId))
            {
                return(null);
            }

            DeptTransferMasterDAL dalDeptTransferMaster = new DeptTransferMasterDAL();
            StringBuilder         strFilter             = new StringBuilder();
            List <string>         objArgs = new List <string>();

            if (!string.IsNullOrEmpty(strDeptTransferMasterId))
            {
                strFilter.Append(" DEPTTRANSFERMASTERID == @0");
                objArgs.Add(strDeptTransferMasterId);
            }

            T_FB_DEPTTRANSFERMASTER entRd = dalDeptTransferMaster.GetDeptTransferMasterRdByMultSearch(strFilter.ToString(), objArgs.ToArray());

            return(entRd);
        }
Ejemplo n.º 3
0
        private void GetOrderDetail()
        {
            T_FB_DEPTTRANSFERMASTER master = this.OrderEntity.Entity as T_FB_DEPTTRANSFERMASTER;

            // 调出单位类型
            QueryExpression qeTransferType = this.OrderEntity.GetQueryExpression("TRANSFERFROMTYPE");

            qeTransferType.PropertyName = "ACCOUNTOBJECTTYPE";
            // 预算单位
            QueryExpression qeFrom = this.OrderEntity.GetQueryExpression("TRANSFERFROM");

            qeFrom.RelatedExpression = qeTransferType;
            if (master.TRANSFERFROMTYPE.Equal(3)) // 个人
            {
                qeFrom.PropertyName = FieldName.OwnerID;

                // 岗位

                QueryExpression qePost = QueryExpressionHelper.Equal(FieldName.OwnerPostID, master.TRANSFERFROMPOSTID);

                qeFrom.RelatedExpression = qePost;
            }
            else
            {
                qeFrom.PropertyName = FieldName.OwnerDepartmentID;
            }

            // 预算年份
            QueryExpression qeYear = QueryExpressionHelper.Equal("BUDGETYEAR", master.BUDGETARYMONTH.Year.ToString());

            qeYear.RelatedExpression = qeFrom;
            // 预算月份
            QueryExpression qeMonth = QueryExpressionHelper.Equal("BUDGETMONTH", master.BUDGETARYMONTH.Month.ToString());

            qeMonth.RelatedExpression = qeYear;
            qeMonth.QueryType         = typeof(T_FB_DEPTTRANSFERDETAIL).Name;
            fbService.QueryFBEntities(qeMonth);
        }
Ejemplo n.º 4
0
 public void AddToT_FB_DEPTTRANSFERMASTER(T_FB_DEPTTRANSFERMASTER t_FB_DEPTTRANSFERMASTER)
 {
     base.AddObject("T_FB_DEPTTRANSFERMASTER", t_FB_DEPTTRANSFERMASTER);
 }
Ejemplo n.º 5
0
 public static T_FB_DEPTTRANSFERMASTER CreateT_FB_DEPTTRANSFERMASTER(string dEPTTRANSFERMASTERID, global::System.DateTime bUDGETARYMONTH, decimal eDITSTATES, decimal cHECKSTATES, string oWNERID, string oWNERPOSTID, string oWNERDEPARTMENTID, string oWNERCOMPANYID, string cREATEUSERID, global::System.DateTime cREATEDATE, string cREATECOMPANYID, string cREATEDEPARTMENTID, string cREATEPOSTID, string uPDATEUSERID, global::System.DateTime uPDATEDATE)
 {
     T_FB_DEPTTRANSFERMASTER t_FB_DEPTTRANSFERMASTER = new T_FB_DEPTTRANSFERMASTER();
     t_FB_DEPTTRANSFERMASTER.DEPTTRANSFERMASTERID = dEPTTRANSFERMASTERID;
     t_FB_DEPTTRANSFERMASTER.BUDGETARYMONTH = bUDGETARYMONTH;
     t_FB_DEPTTRANSFERMASTER.EDITSTATES = eDITSTATES;
     t_FB_DEPTTRANSFERMASTER.CHECKSTATES = cHECKSTATES;
     t_FB_DEPTTRANSFERMASTER.OWNERID = oWNERID;
     t_FB_DEPTTRANSFERMASTER.OWNERPOSTID = oWNERPOSTID;
     t_FB_DEPTTRANSFERMASTER.OWNERDEPARTMENTID = oWNERDEPARTMENTID;
     t_FB_DEPTTRANSFERMASTER.OWNERCOMPANYID = oWNERCOMPANYID;
     t_FB_DEPTTRANSFERMASTER.CREATEUSERID = cREATEUSERID;
     t_FB_DEPTTRANSFERMASTER.CREATEDATE = cREATEDATE;
     t_FB_DEPTTRANSFERMASTER.CREATECOMPANYID = cREATECOMPANYID;
     t_FB_DEPTTRANSFERMASTER.CREATEDEPARTMENTID = cREATEDEPARTMENTID;
     t_FB_DEPTTRANSFERMASTER.CREATEPOSTID = cREATEPOSTID;
     t_FB_DEPTTRANSFERMASTER.UPDATEUSERID = uPDATEUSERID;
     t_FB_DEPTTRANSFERMASTER.UPDATEDATE = uPDATEDATE;
     return t_FB_DEPTTRANSFERMASTER;
 }
Ejemplo n.º 6
0
        protected override void OnOwnerIsNotReady()
        {
            T_FB_DEPTTRANSFERMASTER entity = this.OrderEntity.Entity as T_FB_DEPTTRANSFERMASTER;

            entity.OWNERID = null;
        }