You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I apologize immediately, I am writing with a translator. I have such classes:
public class GiveDetail : IEntity, IEquatable
{
public int Id { get; set; }
public Give Give { get; set; }
public Product Product { get; set; }
public int? CountProduct { get; set; }
public bool IsSelected { get; set; }
public bool Equals(GiveDetail other) => Id == other.Id;
}
public class Product : IEntity, IEquatable
{
public int Id { get; set; }
public Category Category { get; set; }
public Brand Brand { get; set; }
public Unit Unit { get; set; }
public string Title { get; set; }
public string Model { get; set; }
public int? CountProduct { get; set; }
public int? Price { get; set; }
public string OKPD { get; set; }
public string? Description { get; set; }
public string TextProduct { get { return Title + " " + Model; } }
public bool IsSelected { get; set; }
public bool Equals(Product other) => Id == other.Id;
}
public class Give : IEntity, IEquatable
{
public int Id { get; set; }
public Employee Employee { get; set; }
public DateTime? DateGive { get; set; }
public string StringDateGive { get { return DateGive?.ToString("dd.MM.yyyy"); } }
public string TextGive { get { return Employee.Name[0] + "." + Employee.Lastname[0] + ". " + Employee.Surname + " " + DateGive?.ToString("dd.MM.yyyy"); } }
public bool IsSelected { get; set; }
public bool Equals(Give other) => Id == other.Id;
}
public class Employee : IEntity, IEquatable
{
public int Id { get; set; }
public Department Department { get; set; }
public Post Post { get; set; }
public string Surname { get; set; }
public string Name { get; set; }
public string? Lastname { get; set; }
public string? Email { get; set; }
public string NumPhone { get; set; }
public string Address { get; set; }
public string TextEmployee { get { return Surname + " " + Name + " " + Lastname; } }
public bool IsSelected { get; set; }
public bool Equals(Employee other) => Id == other.Id;
}
Вот так я заполняю элемент объекта
public IEnumerable IncomingProducts => Model.PublicIncommingProducts;
(string fileName, string pathSave) = (DialogService.ShowInput("Введите название документа"), DialogService.ShowBrowserCatalog());
if (string.IsNullOrEmpty(fileName) || string.IsNullOrEmpty(pathSave)) return;
var data = new
{
Day = dateProvide.Day,
Month = dateProvide.ToString("MMMM"),
Year = dateProvide.ToString("yy"),
NumPage = 2,
Company = TextStructureName,
Department = SelectedDepartment.Title,
MaterialPerson = SelectedMaterialPerson.TextEmployee,
Items = IncomingProducts
};
using (var template = new XLTemplate(pathPattern))
{
I apologize immediately, I am writing with a translator. I have such classes:
public class GiveDetail : IEntity, IEquatable
{
public int Id { get; set; }
public Give Give { get; set; }
public Product Product { get; set; }
public int? CountProduct { get; set; }
public bool IsSelected { get; set; }
}
public class Product : IEntity, IEquatable
{
public int Id { get; set; }
public Category Category { get; set; }
public Brand Brand { get; set; }
public Unit Unit { get; set; }
public string Title { get; set; }
public string Model { get; set; }
public int? CountProduct { get; set; }
public int? Price { get; set; }
public string OKPD { get; set; }
public string? Description { get; set; }
public string TextProduct { get { return Title + " " + Model; } }
public bool IsSelected { get; set; }
}
public class Give : IEntity, IEquatable
{
public int Id { get; set; }
public Employee Employee { get; set; }
public DateTime? DateGive { get; set; }
public string StringDateGive { get { return DateGive?.ToString("dd.MM.yyyy"); } }
public string TextGive { get { return Employee.Name[0] + "." + Employee.Lastname[0] + ". " + Employee.Surname + " " + DateGive?.ToString("dd.MM.yyyy"); } }
public bool IsSelected { get; set; }
}
public class Employee : IEntity, IEquatable
{
public int Id { get; set; }
public Department Department { get; set; }
public Post Post { get; set; }
public string Surname { get; set; }
public string Name { get; set; }
public string? Lastname { get; set; }
public string? Email { get; set; }
public string NumPhone { get; set; }
public string Address { get; set; }
public string TextEmployee { get { return Surname + " " + Name + " " + Lastname; } }
}
Вот так я заполняю элемент объекта
public IEnumerable IncomingProducts => Model.PublicIncommingProducts;
(string fileName, string pathSave) = (DialogService.ShowInput("Введите название документа"), DialogService.ShowBrowserCatalog());
if (string.IsNullOrEmpty(fileName) || string.IsNullOrEmpty(pathSave)) return;
var data = new
{
Day = dateProvide.Day,
Month = dateProvide.ToString("MMMM"),
Year = dateProvide.ToString("yy"),
NumPage = 2,
Company = TextStructureName,
Department = SelectedDepartment.Title,
MaterialPerson = SelectedMaterialPerson.TextEmployee,
Items = IncomingProducts
};
using (var template = new XLTemplate(pathPattern))
{
}
I get this error
here is my template
PatternMaterialStatement.xlsx
The text was updated successfully, but these errors were encountered: