Beispiel #1
0
 public CashFlowInfo(AC_CashFlowList m)
 {
     if (m != null)
     {
         FillModel(m);
     }
 }
Beispiel #2
0
        private void FillModel(AC_CashFlowList m)
        {
            if (m == null)
            {
                return;
            }

            ID               = m.ID;
            TradeClient      = m.TradeClient;
            PayDate          = m.PayDate;
            AgentStaff       = m.AgentStaff;
            PayMode          = m.PayMode;
            PayClassify      = m.PayClassify;
            Amount           = m.Amount;
            RelateDeliveryId = m.RelateDeliveryId;
            ConfirmState     = m.ConfirmState;
            RelateOrderId    = m.RelateOrderId;
            WorkList         = m.WorkList;
            Remark           = m.Remark;

            if (m.TradeClient > 0)
            {
                CM_Client c = new CM_ClientBLL(m.TradeClient).Model;
                if (c != null)
                {
                    TradeClientName = c.FullName;
                }
            }

            if (m.AgentStaff > 0)
            {
                Org_Staff s = new Org_StaffBLL(m.AgentStaff).Model;
                if (s != null)
                {
                    AgentStaffName = s.RealName;
                }
            }

            if (m.RelateDeliveryId > 0)
            {
                PBM_Delivery d = new PBM_DeliveryBLL(m.RelateDeliveryId).Model;
                RelateDeliveryCode = d.SheetCode == "" ? d.ID.ToString() : d.SheetCode;
            }

            if (m.RelateDeliveryId > 0)
            {
                PBM_Delivery d = new PBM_DeliveryBLL(m.RelateDeliveryId).Model;
                RelateDeliveryCode = d.SheetCode == "" ? d.ID.ToString() : d.SheetCode;
            }

            if (m.PayMode > 0)
            {
                Dictionary_Data dic = DictionaryBLL.GetDicCollections("PBM_AC_PayMode")[m.PayMode.ToString()];
                if (dic != null)
                {
                    PayModeName = dic.Name;
                }
            }
            if (m.PayClassify > 0)
            {
                Dictionary_Data dic = DictionaryBLL.GetDicCollections("PBM_AC_PayClassify")[m.PayClassify.ToString()];
                if (dic != null)
                {
                    PayClassifyName = dic.Name;
                }
            }
            if (m.ConfirmState > 0)
            {
                Dictionary_Data dic = DictionaryBLL.GetDicCollections("PBM_AC_BillConfirmState")[m.ConfirmState.ToString()];
                if (dic != null)
                {
                    ConfirmStateName = dic.Name;
                }
            }
        }