示例#1
0
 public void EditProduct(Code code
                         , Name name
                         , GeneralText description
                         , GeneralText reference
                         , Category category
                         , Warehouse werehouse
                         , UnitOfMeasure unitOfMeasure
                         , Tax tax
                         , bool isService
                         , decimal cost
                         , decimal price
                         , decimal price2
                         , decimal price3
                         , decimal price4
                         , EntityStatus status)
 {
     Code          = code;
     Name          = name;
     Description   = description;
     Reference     = reference;
     Category      = category;
     Warehouse     = werehouse;
     UnitOfMeasure = unitOfMeasure;
     Tax           = tax;
     IsService     = isService;
     Cost          = cost;
     Price         = price;
     Price2        = price2;
     Price3        = price3;
     Price4        = price4;
     Status        = status;
     Modified      = DateTime.Now;
 }
示例#2
0
 public Supplier(Code code
     , Name name
     , Email email
     , Phone phone
     , string rnc
     , string homeOrApartment
     , string city
     , string street
     , Country country
     , SupplierGroup supplierGroup
     , PaymentTerm paymentTerm
     , GeneralText notes
     , bool isInformalSupplier
     , DateTime created
     , DateTime? modified = null
     , EntityStatus status = EntityStatus.Active)
 {
     Code                = code;
     Name                = name;
     Email               = email;
     Phone               = phone;
     Rnc                 = rnc;
     HomeOrApartment     = homeOrApartment;
     City                = city;
     Street              = street;
     Country             = country;
     SupplierGroup       = supplierGroup;
     PaymentTerm         = paymentTerm;
     Notes               = notes;
     IsInformalSupplier  = isInformalSupplier;
     Created             = created == DateTime.MinValue ? DateTime.Now : created;
     Modified            = modified;
     Status              = status;
 }
示例#3
0
 public void EditSupplier(
      Code code
     , Name name
     , Email email
     , Phone phone
     , SupplierGroup supplierGroup
     , PaymentTerm paymentTerm
     , GeneralText notes
     , bool isInformalSupplier
     , string rnc
     , string homeOrApartment
     , string city
     , string street
     , Country country
     , EntityStatus status)
 {
     Code                 = code;
     Name                 = name;
     Email                = email;
     Phone                = phone;
     Rnc                  = rnc;
     HomeOrApartment      = homeOrApartment;
     City                 = city;
     Street               = street;
     SupplierGroup        = supplierGroup;
     PaymentTerm          = paymentTerm;
     Notes                = notes;
     IsInformalSupplier   = isInformalSupplier;
     Country              = country;
     Status               = status;
     Modified             = DateTime.Now;
 }
示例#4
0
        public void EditInvoiceHeader(Code code,
                                      string rnc,
                                      Client client,
                                      DateTime dueDate,
                                      PaymentTerm paymentTerm,
                                      GeneralText notes,
                                      GeneralText termAndConditions,
                                      GeneralText footer,
                                      IEnumerable <InvoiceDetailDto> invoiceDetails)
        {
            var invoiceHeader        = this;
            var _localInvoiceDetails = invoiceDetails.Map(d =>
                                                          new InvoiceDetail(new Code(d.ProductCode),
                                                                            new Name(d.ProductDescription),
                                                                            d.Qty,
                                                                            d.Amount,
                                                                            d.TaxPercent,
                                                                            invoiceHeader));

            Code              = code;
            Rnc               = rnc;
            Client            = client;
            DueDate           = dueDate;
            PaymentTerm       = paymentTerm;
            Notes             = notes;
            TermAndConditions = termAndConditions;
            Footer            = footer;
            Modified          = DateTime.UtcNow;
            _invoiceDetails.RemoveAll(c => c.Id == c.Id);
            _invoiceDetails.AddRange(_localInvoiceDetails);
        }
示例#5
0
 public void Deconstruct(out long id,
                         out Name name,
                         out GeneralText description,
                         out DateTime created,
                         out DateTime?modified,
                         out EntityStatus status)
 => (id, name, description, created, modified, status)
     = (Id, Name, Description, Created, Modified, Status);
示例#6
0
 static void SetParams(General g, int n)
 {
     g.nameGeneral = GeneralText.GetName(n);
     g.descGeneral = GeneralText.GetDescription(n);
     g.prefab      = ResManager.instance.gensE[n];
     g.img         = ResManager.instance.genEImg[n];
     g.img2        = ResManager.instance.genEImg2[n];
 }
示例#7
0
 public void EditBank(Name accountName,
                      string accountNumber,
                      GeneralText description,
                      decimal initialBalance,
                      BankAccountType bankAccountType,
                      EntityStatus status)
 {
     AccountName     = accountName;
     AccountNumber   = accountNumber;
     Description     = description;
     AccountNumber   = accountNumber;
     BankAccountType = bankAccountType;
     InitialBalance  = initialBalance;
     Modified        = DateTime.Now;
     Status          = status;
 }
示例#8
0
 public void EditBillPaymentEdit(Code code
                                 , GeneralText concept
                                 , int billInvoiceHeaderId
                                 , decimal amount
                                 , decimal qty
                                 , decimal taxPercent
                                 , BillPaymentHeader billPaymentHeader)
 {
     Code   = code;
     Amount = amount;
     Qty    = qty;
     BillInvoiceHeaderId = billInvoiceHeaderId;
     TaxPercent          = taxPercent;
     Concept             = concept;
     BillPaymentHeader   = billPaymentHeader;
 }
示例#9
0
 public BankAccount(Name accountName,
                    string accountNumber,
                    GeneralText description,
                    decimal initialBalance,
                    BankAccountType bankAccountType,
                    DateTime created,
                    EntityStatus status = EntityStatus.Active)
 {
     AccountName     = accountName;
     AccountNumber   = accountNumber;
     Description     = description;
     InitialBalance  = initialBalance;
     AccountNumber   = accountNumber;
     BankAccountType = bankAccountType;
     Created         = created == DateTime.MinValue ? DateTime.Now : created;
     Status          = status;
 }
示例#10
0
        public void EditPurchaseOrderHeader(Code code
                                            , Name supplierName
                                            , int supplierId
                                            , string rnc
                                            , GeneralText address
                                            , DateTime deliverDate
                                            , Name paymentTermName
                                            , int paymentTermId
                                            , Name warehouseName
                                            , int warehouseId
                                            , GeneralText notes
                                            , decimal subtotal
                                            , decimal taxTotal
                                            , decimal discountTotal
                                            , decimal total
                                            , List <PurchaseOrderDetail> purchaseOrderDetails)
        {
            var header = this;
            var _localpurchaseOrder = purchaseOrderDetails.Map(d =>
                                                               new PurchaseOrderDetail(d.ProductCode
                                                                                       , d.Description
                                                                                       , d.Cost
                                                                                       , d.Qty
                                                                                       , d.DiscountValue
                                                                                       , d.TaxPercent
                                                                                       , header));

            Code            = code;
            SupplierName    = supplierName;
            SupplierId      = supplierId;
            Rnc             = rnc;
            Address         = address;
            DeliverDate     = deliverDate;
            PaymentTermName = paymentTermName;
            PaymentTermId   = paymentTermId;
            WarehouseName   = warehouseName;
            WarehouseId     = warehouseId;
            Notes           = notes;
            Subtotal        = subtotal;
            TaxTotal        = taxTotal;
            DiscountTotal   = discountTotal;
            Total           = total;
            Status          = EntityStatus.Active;
            Modified        = DateTime.UtcNow;
            _purchaseOrderDetails.AddRange(_localpurchaseOrder);
        }
示例#11
0
    public void SettingsLoader()
    {
        BackgroundSettings = new Page("BG settings");
        AddChild(BackgroundSettings);

        MusicVolumeButton = new UpAndDownButton();
        MusicVolumeButton.SetXY(1155, 338);
        AddChild(MusicVolumeButton);

        SFXVolumeButton = new UpAndDownButton();
        SFXVolumeButton.SetXY(1155, 456);
        AddChild(SFXVolumeButton);

        MusicVolumeText = new GeneralText(MusicVolumeButton);
        MusicVolumeText.SetXY(MusicVolumeButton.x - 250, MusicVolumeButton.y - 182);
        AddChild(MusicVolumeText);

        SFXVolumeText = new GeneralText(SFXVolumeButton);
        SFXVolumeText.SetXY(SFXVolumeButton.x - 250, SFXVolumeButton.y - 182);
        AddChild(SFXVolumeText);
    }
示例#12
0
 public InvoiceHeader(Code code,
                      string ncf,
                      int numberSequenceId,
                      string rnc,
                      Client client,
                      DateTime invoiceDate,
                      DateTime dueDate,
                      PaymentTerm paymentTerm,
                      GeneralText notes,
                      GeneralText termAndConditions,
                      GeneralText footer,
                      decimal discount,
                      decimal subTotal,
                      decimal taxTotal,
                      decimal total,
                      List <InvoiceDetail> invoiceDetail,
                      DateTime created,
                      EntityStatus status = EntityStatus.Active)
 {
     Code              = code;
     Ncf               = ncf;
     NumberSequenceId  = numberSequenceId;
     Rnc               = rnc;
     Client            = client;
     InvoiceDate       = invoiceDate;
     DueDate           = dueDate;
     PaymentTerm       = paymentTerm;
     Notes             = notes;
     TermAndConditions = termAndConditions;
     Footer            = footer;
     Discount          = discount;
     SubTotal          = subTotal;
     TaxTotal          = taxTotal;
     Total             = total;
     Created           = created == DateTime.MinValue ? DateTime.Now : created;
     Status            = status;
     _invoiceDetails.AddRange(CreateDetails(invoiceDetail));
 }
示例#13
0
 public PurchaseOrderHeader(Code code
                            , Name supplierName
                            , int supplierId
                            , string rnc
                            , GeneralText address
                            , DateTime deliverDate
                            , Name paymentTermName
                            , int paymentTermId
                            , Name warehouseName
                            , int warehouseId
                            , GeneralText notes
                            , decimal subtotal
                            , decimal taxTotal
                            , decimal discountTotal
                            , decimal total
                            , ImmutableList <PurchaseOrderDetail> purchaseOrderDetails
                            , DateTime created
                            , EntityStatus status = EntityStatus.Active)
 {
     Code            = code;
     SupplierName    = supplierName;
     SupplierId      = supplierId;
     Rnc             = rnc;
     Address         = address;
     DeliverDate     = deliverDate;
     PaymentTermName = paymentTermName;
     PaymentTermId   = paymentTermId;
     WarehouseName   = warehouseName;
     WarehouseId     = warehouseId;
     Notes           = notes;
     Subtotal        = subtotal;
     TaxTotal        = taxTotal;
     DiscountTotal   = discountTotal;
     Total           = total;
     Status          = status;
     Created         = created == DateTime.MinValue ? DateTime.UtcNow : created;
     _purchaseOrderDetails.AddRange(CreateDetails(purchaseOrderDetails));
 }
示例#14
0
 public Product(Code code
                , Name name
                , GeneralText description
                , GeneralText reference
                , Category category
                , Warehouse werehouse
                , UnitOfMeasure unitOfMeasure
                , Tax tax
                , bool isService
                , decimal cost
                , decimal price
                , decimal price2
                , decimal price3
                , decimal price4
                , DateTime created
                , DateTime?modified
                , EntityStatus status = EntityStatus.Active)
 {
     Code          = code;
     Name          = name;
     Description   = description;
     Reference     = reference;
     Category      = category;
     Warehouse     = werehouse;
     UnitOfMeasure = unitOfMeasure;
     Tax           = tax;
     IsService     = isService;
     Cost          = cost;
     Price         = price;
     Price2        = price2;
     Price3        = price3;
     Price4        = price4;
     Created       = created == DateTime.MinValue ? DateTime.Now : created;
     Modified      = modified;
     Status        = status;
 }
示例#15
0
 public void EditBankAccountType(
     Name name,
     GeneralText description,
     EntityStatus status)
 => (Name, Description, Status)
     = (name, description, status);
示例#16
0
 public BankAccountType(Name name,
                        GeneralText description,
                        DateTime created,
                        EntityStatus status = EntityStatus.Active)
 => (Name, Description, Created, Status)
示例#17
0
    public static General GenarateGeneral()
    {
        int i = 0;
        //i = Random.Range(0, 9);
        General general = new General();

        general.nameGeneral                      = GeneralText.GetName(i);
        general.descGeneral                      = GeneralText.GetDescription(i);
        general.prefab                           = ResManager.instance.gens[i];
        general.img                              = ResManager.instance.genImg[i];
        general.img2                             = ResManager.instance.genImg2[i];
        general.PARAMS[GENERAL_LEVEL]            = Random.Range(7, 15);
        general.PARAMS[GENERAL_STRENGTH]         = Random.Range(3, 8) + (Random.Range(1, 3) * general.PARAMS[GENERAL_LEVEL]) - 2;           //Сила
        general.PARAMS[GENERAL_AGILITY]          = Random.Range(3, 8) + (Random.Range(1, 3) * general.PARAMS[GENERAL_LEVEL]) - 2;           //Ловкость
        general.PARAMS[GENERAL_INTELLECT]        = Random.Range(3, 8) + (Random.Range(1, 3) * general.PARAMS[GENERAL_LEVEL]) - 2;           //Интеллект
        general.PARAMS[GENERAL_EXP]              = 0;
        general.PARAMS[GENERAL_HP]               = 500 + 5 * general.PARAMS[GENERAL_STRENGTH];                                              //Жизни
        general.PARAMS[GENERAL_MANA]             = 10 + 5 * general.PARAMS[GENERAL_INTELLECT];                                              //Мана
        general.PARAMS[GENERAL_DAMAGE]           = 10 + (3 * general.PARAMS[GENERAL_STRENGTH] + general.PARAMS[GENERAL_INTELLECT]) / 2;     //Урон физический
        general.PARAMS[GENERAL_DAMAGE_ICE]       = 0;                                                                                       //Урон ледяной
        general.PARAMS[GENERAL_DAMAGE_FIRE]      = 0;                                                                                       //Урон огненый
        general.PARAMS[GENERAL_DAMAGE_ELECTRIC]  = 0;                                                                                       //Урон электрический
        general.PARAMS[GENERAL_DEFENSE]          = 0 + (2 * general.PARAMS[GENERAL_STRENGTH] + 3 * general.PARAMS[GENERAL_AGILITY]) / 10;   //Защита/Броня
        general.PARAMS[GENERAL_DEFENSE_ICE]      = 0 + general.PARAMS[GENERAL_INTELLECT] / 2;                                               //Защита от льда
        general.PARAMS[GENERAL_DEFENSE_FIRE]     = 0 + general.PARAMS[GENERAL_INTELLECT] / 2;                                               //Защита от огня
        general.PARAMS[GENERAL_DEFENSE_ELECTRIC] = 0 + general.PARAMS[GENERAL_INTELLECT] / 2;                                               //Защита от электричества
        general.PARAMS[GENERAL_EVASION]          = 0 + general.PARAMS[GENERAL_AGILITY] / 5;                                                 //Уклонение
        general.PARAMS[GENERAL_BLOCK]            = 0 + general.PARAMS[GENERAL_AGILITY] / 5;                                                 //Блок
        general.PARAMS[GENERAL_ACCURACY]         = 40 + (3 * general.PARAMS[GENERAL_AGILITY] + 2 * general.PARAMS[GENERAL_INTELLECT]) / 10; //Точность
        general.PARAMS[GENERAL_CRIT_DAMAGE]      = 30;                                                                                      //Критический урон
        general.PARAMS[GENERAL_CRIT_CHANGE]      = 5;                                                                                       //Крит шанс
        general.PARAMS[GENERAL_INITIATIVE]       = 0 + general.PARAMS[GENERAL_INTELLECT] * 5;                                               //Инициатива
        general.PARAMS[GENERAL_PARRY]            = 0 + general.PARAMS[GENERAL_AGILITY] / 5;                                                 //Парирование удара/отражение

        general.skill0             = SkillName.skill0;
        general.skill_lvl_0        = 1;
        general.skill0Delay        = SkillInfo.GetSkill(general.skill0, general.skill_lvl_0).delay;
        general.skill0Delay_Curent = general.skill0Delay;
        general.skill1             = SkillName.skill1;
        general.skill_lvl_1        = 1;
        general.skill2             = SkillName.skill2;
        general.skill_lvl_2        = 1;

        general.skillB      = SkillNameB.skillB0;
        general.skill_lvl_B = 1;

        /*switch (general.nameGeneral)    Скилы выдаваемые при создании генералу, в зависимости от его имени либо типа.
         * {
         *  case "Алёша":
         *      general.skill0 = SkillName.skill0;
         *      general.skill_lvl_0 = 1;
         *      general.skill1 = SkillName.skill1;
         *      general.skill_lvl_1 = 0;
         *      general.skill2 = SkillName.skill2;
         *      general.skill_lvl_2 = 0;
         *      general.skillB = SkillNameB.skillB0;
         *      general.skill_lvl_B = 0;
         *      break;
         *  case "Клоун":
         *      general.skill0 = SkillName.skill0;
         *      general.skill_lvl_0 = 0;
         *      general.skill1 = SkillName.skill1;
         *      general.skill_lvl_1 = 0;
         *      general.skill2 = SkillName.skill2;
         *      general.skill_lvl_2 = 0;
         *      general.skillB = SkillNameB.skillB0;
         *      general.skill_lvl_B = 0;
         *      break;
         *
         * }*/


        //Боевые параметры(Текущий)
        general.PARAMS[GENERAL_HP_CURRENT]               = general.PARAMS[GENERAL_HP];
        general.PARAMS[GENERAL_MANA_CURRENT]             = general.PARAMS[GENERAL_MANA];
        general.PARAMS[GENERAL_DAMAGE_CURRENT]           = general.PARAMS[GENERAL_DAMAGE];
        general.PARAMS[GENERAL_DAMAGE_ICE_CURRENT]       = general.PARAMS[GENERAL_DAMAGE_ICE];
        general.PARAMS[GENERAL_DAMAGE_FIRE_CURRENT]      = general.PARAMS[GENERAL_DAMAGE_FIRE];
        general.PARAMS[GENERAL_DAMAGE_ELECTRIC_CURRENT]  = general.PARAMS[GENERAL_DAMAGE_ELECTRIC];
        general.PARAMS[GENERAL_STRENGTH_CURRENT]         = general.PARAMS[GENERAL_STRENGTH];
        general.PARAMS[GENERAL_AGILITY_CURRENT]          = general.PARAMS[GENERAL_AGILITY];
        general.PARAMS[GENERAL_INTELLECT_CURRENT]        = general.PARAMS[GENERAL_INTELLECT];
        general.PARAMS[GENERAL_DEFENSE_CURRENT]          = general.PARAMS[GENERAL_DEFENSE];
        general.PARAMS[GENERAL_DEFENSE_ICE_CURRENT]      = general.PARAMS[GENERAL_DEFENSE_ICE];
        general.PARAMS[GENERAL_DEFENSE_FIRE_CURRENT]     = general.PARAMS[GENERAL_DEFENSE_FIRE];
        general.PARAMS[GENERAL_DEFENSE_ELECTRIC_CURRENT] = general.PARAMS[GENERAL_DEFENSE_ELECTRIC];
        general.PARAMS[GENERAL_EVASION_CURRENT]          = general.PARAMS[GENERAL_EVASION];
        general.PARAMS[GENERAL_BLOCK_CURRENT]            = general.PARAMS[GENERAL_BLOCK];
        general.PARAMS[GENERAL_ACCURACY_CURRENT]         = general.PARAMS[GENERAL_ACCURACY];
        general.PARAMS[GENERAL_CRIT_DAMAGE_CURRENT]      = general.PARAMS[GENERAL_CRIT_DAMAGE];
        general.PARAMS[GENERAL_CRIT_CHANGE_CURRENT]      = general.PARAMS[GENERAL_CRIT_CHANGE];
        general.PARAMS[GENERAL_INITIATIVE_CURRENT]       = general.PARAMS[GENERAL_INITIATIVE];
        general.PARAMS[GENERAL_PARRY_CURRENT]            = general.PARAMS[GENERAL_PARRY];

        return(general);
    }
示例#18
0
 public void EditTaxRegimeType(Name name, GeneralText description)
 {
     Name        = name;
     Description = description;
 }