Esempio n. 1
0
 public BankAccountManager(Environment.GlobalConfig.DB.FromType fromType)
 {
     _bankAccountDao         = InventoryInstance.GetBankAccountDao(fromType);
     _bankAccounts           = InventoryInstance.GetBankAccountsDao(fromType);
     _wasteBookDao           = InventoryInstance.GetWasteBookDao(fromType);
     _reckoningElseFilialeid = new Guid(ConfigManage.GetConfigValue("RECKONING_ELSE_FILIALEID"));
 }
Esempio n. 2
0
 public CostReport(Environment.GlobalConfig.DB.FromType fromType)
 {
     _costReport       = InventoryInstance.GetCostReportDao(fromType);
     _costReckoningDao = InventoryInstance.GetCostReckoningDao(fromType);
     _bankAccountsDao  = InventoryInstance.GetBankAccountsDao(fromType);
     _personnelManager = new PersonnelSao();
 }
        public override void Initialize()
        {
            base.Initialize();

            var controllerType = ReflectionManager.LooseGetType(InventoryInstance.InterfaceControllerTypeName);
            var args           = new object[] { this };

            InterfaceController = DynamicTypeFactory.CreateInstance <InventoryInterfaceController>(controllerType, args);
            InterfaceController.Initialize();

            if (Owner.TryGetComponent(out _sprite))
            {
                foreach (var mask in InventoryInstance.SlotMasks.OrderBy(s => InventoryInstance.SlotDrawingOrder(s)))
                {
                    if (mask == Slots.NONE)
                    {
                        continue;
                    }

                    _sprite.LayerMapReserveBlank(mask);
                }
            }

            // Component state already came in but we couldn't set anything visually because, well, we didn't initialize yet.
            foreach (var(slot, entity) in _slots)
            {
                _setSlot(slot, entity);
            }
        }
Esempio n. 4
0
 public ReckoningManager(Environment.GlobalConfig.DB.FromType fromType)
 {
     _companyCussent    = new CompanyCussent(fromType);
     _reckoningDao      = InventoryInstance.GetReckoningDao(fromType);
     _goodsOrderDeliver = new GoodsOrderDeliver(fromType);
     _goodsOrder        = new DAL.Implement.Order.GoodsOrder(fromType);
     _goodsOrderDetail  = new GoodsOrderDetail(fromType);
     _codeManager       = new CodeManager();
     _storageRecordDao  = new StorageRecordDao(fromType);
 }
    static public InventoryInstance Instance()
    {
        // static Inventory ins = new Inventory();
        if (null == _instance)
        {
            _instance = new InventoryInstance();
        }

        return(_instance);
    }
Esempio n. 6
0
 void Awake()
 {
     if (s_instance == null)
     {
         DontDestroyOnLoad(gameObject);
         s_instance = this;
     }
     else if (s_instance != this)
     {
         Destroy(gameObject);
     }
 }
Esempio n. 7
0
 public CompanyClass(Environment.GlobalConfig.DB.FromType fromType)
 {
     _companyClassDao = InventoryInstance.GetCompanyClassDao(fromType);
 }
Esempio n. 8
0
 public PurchasingDetailManager(Environment.GlobalConfig.DB.FromType fromType)
 {
     _purchasingDao       = new DAL.Implement.Inventory.Purchasing(fromType);
     _purchasingDetailDao = InventoryInstance.GetPurchasingDetailDao(fromType);
 }
Esempio n. 9
0
 public WaitCheckStockGoods(Environment.GlobalConfig.DB.FromType fromType)
 {
     _waitCheckStockGoodsDao = InventoryInstance.GetWaitCheckStockGoodsDao(fromType);
 }
Esempio n. 10
0
        public static void SendDiscovery(string CMServerName, string clientName, string domainName, string SiteCode,
                                         string CertPath, SecureString pass, SmsClientId clientId, ILog log, bool enumerateAndAddCustomDdr = false)
        {
            using (MessageCertificateX509Volatile certificate = new MessageCertificateX509Volatile(CertPath, pass))

            {
                //X509Certificate2 thisCert = new X509Certificate2(CertPath, pass);

                log.Info($"Got SMSID from registration of: {clientId}");

                // create base DDR Message
                ConfigMgrDataDiscoveryRecordMessage ddrMessage = new ConfigMgrDataDiscoveryRecordMessage
                {
                    // Add necessary discovery data
                    SmsId       = clientId,
                    ADSiteName  = "Default-First-Site-Name", //Changed from 'My-AD-SiteName
                    SiteCode    = SiteCode,
                    DomainName  = domainName,
                    NetBiosName = clientName
                };

                ddrMessage.Discover();
                // Add our certificate for message signing
                ddrMessage.AddCertificateToMessage(certificate, CertificatePurposes.Signing);
                ddrMessage.AddCertificateToMessage(certificate, CertificatePurposes.Encryption);
                ddrMessage.Settings.HostName         = CMServerName;
                ddrMessage.Settings.Compression      = MessageCompression.Zlib;
                ddrMessage.Settings.ReplyCompression = MessageCompression.Zlib;
                Debug.WriteLine("Sending [" + ddrMessage.DdrInstances.Count + "] instances of Discovery data to CM");
                if (enumerateAndAddCustomDdr)
                {
                    //see current value for the DDR message
                    var OSSetting = ddrMessage.DdrInstances.OfType <InventoryInstance>().Where(m => m.Class == "CCM_DiscoveryData");

                    ////retrieve actual setting
                    string osCaption = (from x in new ManagementObjectSearcher("SELECT Caption FROM Win32_OperatingSystem").Get().Cast <ManagementObject>()
                                        select x.GetPropertyValue("Caption")).FirstOrDefault().ToString();

                    XmlDocument xmlDoc = new XmlDocument();

                    ////retrieve reported value
                    xmlDoc.LoadXml(ddrMessage.DdrInstances.OfType <InventoryInstance>().FirstOrDefault(m => m.Class == "CCM_DiscoveryData")?.InstanceDataXml.ToString());

                    ////Set OS to correct setting
                    xmlDoc.SelectSingleNode("/CCM_DiscoveryData/PlatformID").InnerText = "Microsoft Windows NT Server 10.0";

                    ////Remove the instance
                    ddrMessage.DdrInstances.Remove(ddrMessage.DdrInstances.OfType <InventoryInstance>().FirstOrDefault(m => m.Class == "CCM_DiscoveryData"));

                    CMFauxStatusViewClassesFixedOSRecord FixedOSRecord = new CMFauxStatusViewClassesFixedOSRecord
                    {
                        PlatformId = osCaption
                    };
                    InventoryInstance instance = new InventoryInstance(FixedOSRecord);

                    ////Add new instance
                    ddrMessage.DdrInstances.Add(instance);
                }

                ddrMessage.SendMessage(Sender);

                ConfigMgrHardwareInventoryMessage hinvMessage = new ConfigMgrHardwareInventoryMessage();
                hinvMessage.Settings.HostName         = CMServerName;
                hinvMessage.SmsId                     = clientId;
                hinvMessage.Settings.Compression      = MessageCompression.Zlib;
                hinvMessage.Settings.ReplyCompression = MessageCompression.Zlib;
                //hinvMessage.Settings.Security.EncryptMessage = true;
                hinvMessage.Discover();

                var Classes = CMFauxStatusViewClasses.GetWMIClasses();
                foreach (string Class in Classes)
                {
                    try { hinvMessage.AddInstancesToInventory(WmiClassToInventoryReportInstance.WmiClassToInventoryInstances(@"root\cimv2", Class)); }
                    catch { log.Info($"!!!Adding class : [{Class}] :( not found on this system"); }
                }

                var SMSClasses = new List <string> {
                    "SMS_Processor", "CCM_System", "SMS_LogicalDisk"
                };
                foreach (string Class in SMSClasses)
                {
                    log.Info($"---Adding class : [{Class}]");
                    try { hinvMessage.AddInstancesToInventory(WmiClassToInventoryReportInstance.WmiClassToInventoryInstances(@"root\cimv2\sms", Class)); }
                    catch { log.Info($"!!!Adding class : [{Class}] :( not found on this system"); }
                }

                hinvMessage.AddCertificateToMessage(certificate, CertificatePurposes.Signing | CertificatePurposes.Encryption);
                hinvMessage.Validate(Sender);
                hinvMessage.SendMessage(Sender);
            };
        }
Esempio n. 11
0
 public GoodsOrder(GlobalConfig.DB.FromType fromType)
 {
     _goodsOrderDao       = new DAL.Implement.Order.GoodsOrder(GlobalConfig.DB.FromType.Write);
     _goodsOrderDetailDao = OrderInstance.GetGoodsOrderDetailDao(fromType);
     _invoiceDao          = InventoryInstance.GetInvoiceDao(fromType);
 }
Esempio n. 12
0
 public MediumReckoning(Environment.GlobalConfig.DB.FromType fromType)
 {
     _dao      = InventoryInstance.GetMediumReckoningDao(fromType);
     _checkDao = InventoryInstance.GetCheckDataRecordDao(fromType);
 }
Esempio n. 13
0
 public StockWarning(Environment.GlobalConfig.DB.FromType fromType)
 {
     _goodsInfoSao    = new GoodsCenterSao();
     _stockWarningDao = InventoryInstance.GetStockWarningDao(fromType);
 }
Esempio n. 14
0
 public Cost(Environment.GlobalConfig.DB.FromType fromType)
 {
     _costDao     = InventoryInstance.GetCostDao(fromType);
     _costCussent = InventoryInstance.GetCostCussentDao(fromType);
 }
Esempio n. 15
0
 public GoodsStockPile(GlobalConfig.DB.FromType fromType)
 {
     _goodsStockPileDao = InventoryInstance.GetGoodsStockPileDao(fromType);
     _goodsCenterSao    = new GoodsCenterSao();
     _storageRecordDao  = new StorageRecordDao(GlobalConfig.DB.FromType.Write);
 }
Esempio n. 16
0
 public SalesGoodsRankingManager(Environment.GlobalConfig.DB.FromType fromType)
 {
     _salesGoodsRankingDao = InventoryInstance.GetSalesGoodsRankingDao(fromType);
     _goodsClassSao        = new GoodsCenterSao();
 }
Esempio n. 17
0
 public CheckDataManager(Environment.GlobalConfig.DB.FromType fromType)
 {
     _checkDataRecordDao = InventoryInstance.GetCheckDataRecordDao(fromType);
 }
Esempio n. 18
0
 /// <summary>
 /// 获取所有往来单位收付款审核权限的信息
 /// Add by liucaijun at 2011-June-15th
 /// </summary>
 /// <returns></returns>
 public static IList <CompanyAuditingPowerInfo> GetAllCompanyAuditingPowerList()
 {
     return(CacheHelper.Get(Key.AllCompanyAuditingPower, () => InventoryInstance.GetCompanyAuditingPowerDao(GlobalConfig.DB.FromType.Read).GetALLCompanyAuditingPower()));
 }
Esempio n. 19
0
 public ReckoningManager(Environment.GlobalConfig.DB.FromType fromType)
 {
     _wasteBookManager = new WasteBook(fromType);
     _reckoningDao     = InventoryInstance.GetReckoningDao(fromType);
 }
Esempio n. 20
0
 public CompanyFundReceipt(Environment.GlobalConfig.DB.FromType fromType)
 {
     _companyFundReceiptDao     = InventoryInstance.GetCompanyFundReceipteDao(fromType);
     _companyFundReceiptInvoice = new DAL.Implement.Inventory.CompanyFundReceiptInvoice(fromType);
 }
Esempio n. 21
0
 public UtilityManage(Environment.GlobalConfig.DB.FromType fromType)
 {
     _utility = InventoryInstance.GetUtilityDalDao(fromType);
 }
Esempio n. 22
0
 public Invoice(Environment.GlobalConfig.DB.FromType fromType)
 {
     _invoiceDao = InventoryInstance.GetInvoiceDao(fromType);
 }
Esempio n. 23
0
 public WasteBookManager(Environment.GlobalConfig.DB.FromType fromType)
 {
     _wasteBookDao = InventoryInstance.GetWasteBookDao(fromType);
 }