учебные планы
This commit is contained in:
parent
3a80f07f55
commit
b86492fa1c
@ -49,6 +49,14 @@ namespace DatabaseCore
|
|||||||
modelBuilder.Entity<Lecturer>().HasIndex(d => new { d.FirstName, d.LastName, d.Patronymic }).IsUnique();
|
modelBuilder.Entity<Lecturer>().HasIndex(d => new { d.FirstName, d.LastName, d.Patronymic }).IsUnique();
|
||||||
|
|
||||||
modelBuilder.Entity<EducationDirection>().HasIndex(d => new { d.Title, d.Profile }).IsUnique();
|
modelBuilder.Entity<EducationDirection>().HasIndex(d => new { d.Title, d.Profile }).IsUnique();
|
||||||
|
|
||||||
|
modelBuilder.Entity<TimeNorm>().HasIndex(d => new { d.TimeNormName, d.TimeNormShortName }).IsUnique();
|
||||||
|
|
||||||
|
modelBuilder.Entity<AcademicPlan>().HasIndex(d => new { d.EducationDirectionId, d.YearEntrance }).IsUnique();
|
||||||
|
|
||||||
|
modelBuilder.Entity<AcademicPlanRecord>().HasIndex(d => new { d.AcademicPlanId, d.DisciplineId, d.Semester }).IsUnique();
|
||||||
|
|
||||||
|
modelBuilder.Entity<AcademicPlanRecordTimeNormHour>().HasIndex(d => new { d.AcademicPlanRecordId, d.TimeNormId }).IsUnique();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Security
|
#region Security
|
||||||
@ -71,6 +79,10 @@ namespace DatabaseCore
|
|||||||
public virtual DbSet<LecturerPost> LecturerPosts { set; get; }
|
public virtual DbSet<LecturerPost> LecturerPosts { set; get; }
|
||||||
public virtual DbSet<Lecturer> Lecturers { set; get; }
|
public virtual DbSet<Lecturer> Lecturers { set; get; }
|
||||||
public virtual DbSet<EducationDirection> EducationDirections { set; get; }
|
public virtual DbSet<EducationDirection> EducationDirections { set; get; }
|
||||||
|
public virtual DbSet<TimeNorm> TimeNorms { set; get; }
|
||||||
|
public virtual DbSet<AcademicPlan> AcademicPlans { set; get; }
|
||||||
|
public virtual DbSet<AcademicPlanRecord> AcademicPlanRecords { set; get; }
|
||||||
|
public virtual DbSet<AcademicPlanRecordTimeNormHour> AcademicPlanRecordTimeNormHours { set; get; }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
1131
DepartmentPortal/Common/DatabaseCore/Migrations/20210405171658_AddAcademicPlans.Designer.cs
generated
Normal file
1131
DepartmentPortal/Common/DatabaseCore/Migrations/20210405171658_AddAcademicPlans.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,183 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace DatabaseCore.Migrations
|
||||||
|
{
|
||||||
|
public partial class AddAcademicPlans : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "AcademicPlans",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
EducationDirectionId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
YearEntrance = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
YearFinish = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DateCreate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DateDelete = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_AcademicPlans", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_AcademicPlans_EducationDirections_EducationDirectionId",
|
||||||
|
column: x => x.EducationDirectionId,
|
||||||
|
principalTable: "EducationDirections",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "TimeNorms",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
DisciplineBlockId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TimeNormName = table.Column<string>(type: "nvarchar(450)", nullable: false),
|
||||||
|
TimeNormShortName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
TimeNormOrder = table.Column<int>(type: "int", nullable: false),
|
||||||
|
TimeNormEducationDirectionQualification = table.Column<int>(type: "int", nullable: true),
|
||||||
|
KindOfLoadName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
KindOfLoadAttributeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
KindOfLoadBlueAsteriskName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
KindOfLoadBlueAsteriskAttributeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
KindOfLoadBlueAsteriskPracticName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
UseInLearningProgress = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
UseInSite = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
DateCreate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DateDelete = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_TimeNorms", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_TimeNorms_DisciplineBlocks_DisciplineBlockId",
|
||||||
|
column: x => x.DisciplineBlockId,
|
||||||
|
principalTable: "DisciplineBlocks",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "AcademicPlanRecords",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
AcademicPlanId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
DisciplineId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
InDepartment = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
Semester = table.Column<int>(type: "int", nullable: false),
|
||||||
|
Zet = table.Column<int>(type: "int", nullable: false),
|
||||||
|
AcademicPlanRecordParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IsParent = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
IsFacultative = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
DateCreate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DateDelete = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_AcademicPlanRecords", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_AcademicPlanRecords_AcademicPlans_AcademicPlanId",
|
||||||
|
column: x => x.AcademicPlanId,
|
||||||
|
principalTable: "AcademicPlans",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_AcademicPlanRecords_Disciplines_DisciplineId",
|
||||||
|
column: x => x.DisciplineId,
|
||||||
|
principalTable: "Disciplines",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "AcademicPlanRecordTimeNormHours",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
AcademicPlanRecordId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TimeNormId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
PlanHours = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||||||
|
DateCreate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DateDelete = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_AcademicPlanRecordTimeNormHours", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_AcademicPlanRecordTimeNormHours_AcademicPlanRecords_AcademicPlanRecordId",
|
||||||
|
column: x => x.AcademicPlanRecordId,
|
||||||
|
principalTable: "AcademicPlanRecords",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_AcademicPlanRecordTimeNormHours_TimeNorms_TimeNormId",
|
||||||
|
column: x => x.TimeNormId,
|
||||||
|
principalTable: "TimeNorms",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.NoAction);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AcademicPlanRecords_AcademicPlanId_DisciplineId_Semester",
|
||||||
|
table: "AcademicPlanRecords",
|
||||||
|
columns: new[] { "AcademicPlanId", "DisciplineId", "Semester" },
|
||||||
|
unique: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AcademicPlanRecords_DisciplineId",
|
||||||
|
table: "AcademicPlanRecords",
|
||||||
|
column: "DisciplineId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AcademicPlanRecordTimeNormHours_AcademicPlanRecordId_TimeNormId",
|
||||||
|
table: "AcademicPlanRecordTimeNormHours",
|
||||||
|
columns: new[] { "AcademicPlanRecordId", "TimeNormId" },
|
||||||
|
unique: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AcademicPlanRecordTimeNormHours_TimeNormId",
|
||||||
|
table: "AcademicPlanRecordTimeNormHours",
|
||||||
|
column: "TimeNormId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AcademicPlans_EducationDirectionId_YearEntrance",
|
||||||
|
table: "AcademicPlans",
|
||||||
|
columns: new[] { "EducationDirectionId", "YearEntrance" },
|
||||||
|
unique: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_TimeNorms_DisciplineBlockId",
|
||||||
|
table: "TimeNorms",
|
||||||
|
column: "DisciplineBlockId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_TimeNorms_TimeNormName",
|
||||||
|
table: "TimeNorms",
|
||||||
|
column: "TimeNormName",
|
||||||
|
unique: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "AcademicPlanRecordTimeNormHours");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "AcademicPlanRecords");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "TimeNorms");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "AcademicPlans");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1131
DepartmentPortal/Common/DatabaseCore/Migrations/20210406063922_UpdUniqueTimeNorm.Designer.cs
generated
Normal file
1131
DepartmentPortal/Common/DatabaseCore/Migrations/20210406063922_UpdUniqueTimeNorm.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,72 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace DatabaseCore.Migrations
|
||||||
|
{
|
||||||
|
public partial class UpdUniqueTimeNorm : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_AcademicPlanRecordTimeNormHours_TimeNorms_TimeNormId",
|
||||||
|
table: "AcademicPlanRecordTimeNormHours");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_TimeNorms_TimeNormName",
|
||||||
|
table: "TimeNorms");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "TimeNormShortName",
|
||||||
|
table: "TimeNorms",
|
||||||
|
type: "nvarchar(450)",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "nvarchar(max)");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_TimeNorms_TimeNormName_TimeNormShortName",
|
||||||
|
table: "TimeNorms",
|
||||||
|
columns: new[] { "TimeNormName", "TimeNormShortName" },
|
||||||
|
unique: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_AcademicPlanRecordTimeNormHours_TimeNorms_TimeNormId",
|
||||||
|
table: "AcademicPlanRecordTimeNormHours",
|
||||||
|
column: "TimeNormId",
|
||||||
|
principalTable: "TimeNorms",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.NoAction);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_AcademicPlanRecordTimeNormHours_TimeNorms_TimeNormId",
|
||||||
|
table: "AcademicPlanRecordTimeNormHours");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_TimeNorms_TimeNormName_TimeNormShortName",
|
||||||
|
table: "TimeNorms");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "TimeNormShortName",
|
||||||
|
table: "TimeNorms",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "nvarchar(450)");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_TimeNorms_TimeNormName",
|
||||||
|
table: "TimeNorms",
|
||||||
|
column: "TimeNormName",
|
||||||
|
unique: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_AcademicPlanRecordTimeNormHours_TimeNorms_TimeNormId",
|
||||||
|
table: "AcademicPlanRecordTimeNormHours",
|
||||||
|
column: "TimeNormId",
|
||||||
|
principalTable: "TimeNorms",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1131
DepartmentPortal/Common/DatabaseCore/Migrations/20210406064319_ChangeTypeInacademicPlan.Designer.cs
generated
Normal file
1131
DepartmentPortal/Common/DatabaseCore/Migrations/20210406064319_ChangeTypeInacademicPlan.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,101 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace DatabaseCore.Migrations
|
||||||
|
{
|
||||||
|
public partial class ChangeTypeInacademicPlan : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_AcademicPlanRecordTimeNormHours_TimeNorms_TimeNormId",
|
||||||
|
table: "AcademicPlanRecordTimeNormHours");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_AcademicPlans_EducationDirectionId_YearEntrance",
|
||||||
|
table: "AcademicPlans");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "YearFinish",
|
||||||
|
table: "AcademicPlans");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "YearEntrance",
|
||||||
|
table: "AcademicPlans");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "YearFinish",
|
||||||
|
table: "AcademicPlans",
|
||||||
|
type: "int",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "YearEntrance",
|
||||||
|
table: "AcademicPlans",
|
||||||
|
type: "int",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_AcademicPlanRecordTimeNormHours_TimeNorms_TimeNormId",
|
||||||
|
table: "AcademicPlanRecordTimeNormHours",
|
||||||
|
column: "TimeNormId",
|
||||||
|
principalTable: "TimeNorms",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.NoAction);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AcademicPlans_EducationDirectionId_YearEntrance",
|
||||||
|
table: "AcademicPlans",
|
||||||
|
columns: new[] { "EducationDirectionId", "YearEntrance" },
|
||||||
|
unique: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_AcademicPlanRecordTimeNormHours_TimeNorms_TimeNormId",
|
||||||
|
table: "AcademicPlanRecordTimeNormHours");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_AcademicPlans_EducationDirectionId_YearEntrance",
|
||||||
|
table: "AcademicPlans");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "YearFinish",
|
||||||
|
table: "AcademicPlans");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "YearEntrance",
|
||||||
|
table: "AcademicPlans");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "YearEntrance",
|
||||||
|
table: "AcademicPlans",
|
||||||
|
type: "datetime2",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "YearFinish",
|
||||||
|
table: "AcademicPlans",
|
||||||
|
type: "datetime2",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_AcademicPlanRecordTimeNormHours_TimeNorms_TimeNormId",
|
||||||
|
table: "AcademicPlanRecordTimeNormHours",
|
||||||
|
column: "TimeNormId",
|
||||||
|
principalTable: "TimeNorms",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_AcademicPlans_EducationDirectionId_YearEntrance",
|
||||||
|
table: "AcademicPlans",
|
||||||
|
columns: new[] { "EducationDirectionId", "YearEntrance" },
|
||||||
|
unique: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -19,6 +19,118 @@ namespace DatabaseCore.Migrations
|
|||||||
.HasAnnotation("ProductVersion", "5.0.4")
|
.HasAnnotation("ProductVersion", "5.0.4")
|
||||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlan", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DateCreate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DateDelete")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid>("EducationDirectionId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<int>("YearEntrance")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int>("YearFinish")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("EducationDirectionId", "YearEntrance")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
|
b.ToTable("AcademicPlans");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecord", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid>("AcademicPlanId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("AcademicPlanRecordParentId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DateCreate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DateDelete")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid>("DisciplineId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("InDepartment")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("IsFacultative")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("IsParent")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<int>("Semester")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int>("Zet")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DisciplineId");
|
||||||
|
|
||||||
|
b.HasIndex("AcademicPlanId", "DisciplineId", "Semester")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
|
b.ToTable("AcademicPlanRecords");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecordTimeNormHour", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid>("AcademicPlanRecordId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DateCreate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DateDelete")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<decimal>("PlanHours")
|
||||||
|
.HasColumnType("decimal(18,2)");
|
||||||
|
|
||||||
|
b.Property<Guid>("TimeNormId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("TimeNormId");
|
||||||
|
|
||||||
|
b.HasIndex("AcademicPlanRecordId", "TimeNormId")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
|
b.ToTable("AcademicPlanRecordTimeNormHours");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DatabaseCore.Models.Department.Classroom", b =>
|
modelBuilder.Entity("DatabaseCore.Models.Department.Classroom", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -510,6 +622,69 @@ namespace DatabaseCore.Migrations
|
|||||||
b.ToTable("Posts");
|
b.ToTable("Posts");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.TimeNorm", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DateCreate")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DateDelete")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid>("DisciplineBlockId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("KindOfLoadAttributeName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("KindOfLoadBlueAsteriskAttributeName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("KindOfLoadBlueAsteriskName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("KindOfLoadBlueAsteriskPracticName")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("KindOfLoadName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int?>("TimeNormEducationDirectionQualification")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("TimeNormName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(450)");
|
||||||
|
|
||||||
|
b.Property<int>("TimeNormOrder")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("TimeNormShortName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(450)");
|
||||||
|
|
||||||
|
b.Property<bool>("UseInLearningProgress")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("UseInSite")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DisciplineBlockId");
|
||||||
|
|
||||||
|
b.HasIndex("TimeNormName", "TimeNormShortName")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
|
b.ToTable("TimeNorms");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DatabaseCore.Models.Security.Access", b =>
|
modelBuilder.Entity("DatabaseCore.Models.Security.Access", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -675,6 +850,55 @@ namespace DatabaseCore.Migrations
|
|||||||
b.ToTable("UserRoles");
|
b.ToTable("UserRoles");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlan", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DatabaseCore.Models.Department.EducationDirection", "EducationDirection")
|
||||||
|
.WithMany("AcademicPlans")
|
||||||
|
.HasForeignKey("EducationDirectionId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("EducationDirection");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecord", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DatabaseCore.Models.Department.AcademicPlan", "AcademicPlan")
|
||||||
|
.WithMany("AcademicPlanRecords")
|
||||||
|
.HasForeignKey("AcademicPlanId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("DatabaseCore.Models.Department.Discipline", "Discipline")
|
||||||
|
.WithMany("AcademicPlanRecords")
|
||||||
|
.HasForeignKey("DisciplineId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("AcademicPlan");
|
||||||
|
|
||||||
|
b.Navigation("Discipline");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecordTimeNormHour", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DatabaseCore.Models.Department.AcademicPlanRecord", "AcademicPlanRecord")
|
||||||
|
.WithMany("AcademicPlanRecordTimeNormHours")
|
||||||
|
.HasForeignKey("AcademicPlanRecordId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("DatabaseCore.Models.Department.TimeNorm", "TimeNorm")
|
||||||
|
.WithMany("AcademicPlanRecordTimeNormHours")
|
||||||
|
.HasForeignKey("TimeNormId")
|
||||||
|
.OnDelete(DeleteBehavior.NoAction)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("AcademicPlanRecord");
|
||||||
|
|
||||||
|
b.Navigation("TimeNorm");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DatabaseCore.Models.Department.Classroom", b =>
|
modelBuilder.Entity("DatabaseCore.Models.Department.Classroom", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("DatabaseCore.Models.Department.Employee", "Employee")
|
b.HasOne("DatabaseCore.Models.Department.Employee", "Employee")
|
||||||
@ -780,6 +1004,17 @@ namespace DatabaseCore.Migrations
|
|||||||
b.Navigation("Post");
|
b.Navigation("Post");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.TimeNorm", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DatabaseCore.Models.Department.DisciplineBlock", "DisciplineBlock")
|
||||||
|
.WithMany("TimeNorms")
|
||||||
|
.HasForeignKey("DisciplineBlockId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("DisciplineBlock");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DatabaseCore.Models.Security.Access", b =>
|
modelBuilder.Entity("DatabaseCore.Models.Security.Access", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("DatabaseCore.Models.Security.Role", "Role")
|
b.HasOne("DatabaseCore.Models.Security.Role", "Role")
|
||||||
@ -810,9 +1045,31 @@ namespace DatabaseCore.Migrations
|
|||||||
b.Navigation("User");
|
b.Navigation("User");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlan", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("AcademicPlanRecords");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.AcademicPlanRecord", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("AcademicPlanRecordTimeNormHours");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.Discipline", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("AcademicPlanRecords");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DatabaseCore.Models.Department.DisciplineBlock", b =>
|
modelBuilder.Entity("DatabaseCore.Models.Department.DisciplineBlock", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Disciplines");
|
b.Navigation("Disciplines");
|
||||||
|
|
||||||
|
b.Navigation("TimeNorms");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.EducationDirection", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("AcademicPlans");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b =>
|
modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b =>
|
||||||
@ -846,6 +1103,11 @@ namespace DatabaseCore.Migrations
|
|||||||
b.Navigation("LecturerPosts");
|
b.Navigation("LecturerPosts");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DatabaseCore.Models.Department.TimeNorm", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("AcademicPlanRecordTimeNormHours");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DatabaseCore.Models.Security.Role", b =>
|
modelBuilder.Entity("DatabaseCore.Models.Security.Role", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Access");
|
b.Navigation("Access");
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
using ModuleTools.Attributes;
|
||||||
|
using ModuleTools.Interfaces;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
|
namespace DatabaseCore.Models.Department
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Класс, описывающий учебный план кафедры
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
[EntityDescription("AcademicPlan", "Учебный план кафедры")]
|
||||||
|
[EntityDependency("EducationDirection", "EducationDirectionId", "Направление, к которму относится учебный план")]
|
||||||
|
public class AcademicPlan : BaseEntity, IEntitySecurityExtenstion<AcademicPlan>
|
||||||
|
{
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("EducationDirectionId")]
|
||||||
|
public Guid EducationDirectionId { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("YearEntrance")]
|
||||||
|
public int YearEntrance { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("YearFinish")]
|
||||||
|
public int YearFinish { get; set; }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public virtual EducationDirection EducationDirection { get; set; }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[ForeignKey("AcademicPlanId")]
|
||||||
|
public virtual List<AcademicPlanRecord> AcademicPlanRecords { get; set; }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public AcademicPlan SecurityCheck(AcademicPlan entity, bool allowFullData) => entity;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
using ModuleTools.Attributes;
|
||||||
|
using ModuleTools.Interfaces;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
|
namespace DatabaseCore.Models.Department
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Класс, описывающий запись учебного плана кафедры
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
[EntityDescription("AcademicPlanRecord", "Запись учебного плана кафедры")]
|
||||||
|
[EntityDependency("AcademicPlan", "AcademicPlanId", "Учебный план, к которму относится запись")]
|
||||||
|
[EntityDependency("Discipline", "DisciplineId", "Дисциплина, которая указана в записи плана")]
|
||||||
|
public class AcademicPlanRecord : BaseEntity, IEntitySecurityExtenstion<AcademicPlanRecord>
|
||||||
|
{
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("AcademicPlanId")]
|
||||||
|
public Guid AcademicPlanId { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("DisciplineId")]
|
||||||
|
public Guid DisciplineId { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("InDepartment")]
|
||||||
|
public bool InDepartment { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("Semester")]
|
||||||
|
public int Semester { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("Zet")]
|
||||||
|
public int Zet { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[MapConfiguration("AcademicPlanRecordParentId")]
|
||||||
|
public Guid? AcademicPlanRecordParentId { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[MapConfiguration("IsParent")]
|
||||||
|
public bool IsParent { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[MapConfiguration("IsFacultative")]
|
||||||
|
public bool IsFacultative { get; set; }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public virtual AcademicPlan AcademicPlan { get; set; }
|
||||||
|
|
||||||
|
public virtual Discipline Discipline { get; set; }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[ForeignKey("AcademicPlanRecordId")]
|
||||||
|
public virtual List<AcademicPlanRecordTimeNormHour> AcademicPlanRecordTimeNormHours { get; set; }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public AcademicPlanRecord SecurityCheck(AcademicPlanRecord entity, bool allowFullData) => entity;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
using ModuleTools.Attributes;
|
||||||
|
using ModuleTools.Interfaces;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
|
namespace DatabaseCore.Models.Department
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Класс, описывающий часы нагрузок записей учебных планов кафедры
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
[EntityDescription("AcademicPlanRecordTimeNormHour", "Часы нагрузки записи учебного плана")]
|
||||||
|
[EntityDependency("AcademicPlanRecord", "AcademicPlanRecordId", "Запись учебного плана, к которой относятся часы")]
|
||||||
|
[EntityDependency("TimeNorm", "TimeNormId", "Норма времени, к которой относятся часы")]
|
||||||
|
public class AcademicPlanRecordTimeNormHour : BaseEntity, IEntitySecurityExtenstion<AcademicPlanRecordTimeNormHour>
|
||||||
|
{
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("AcademicPlanRecordId")]
|
||||||
|
public Guid AcademicPlanRecordId { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("TimeNormId")]
|
||||||
|
public Guid TimeNormId { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("PlanHours")]
|
||||||
|
public decimal PlanHours { get; set; }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public virtual AcademicPlanRecord AcademicPlanRecord { get; set; }
|
||||||
|
|
||||||
|
public virtual TimeNorm TimeNorm { get; set; }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public AcademicPlanRecordTimeNormHour SecurityCheck(AcademicPlanRecordTimeNormHour entity, bool allowFullData) => entity;
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,9 @@
|
|||||||
using ModuleTools.Attributes;
|
using ModuleTools.Attributes;
|
||||||
using ModuleTools.Interfaces;
|
using ModuleTools.Interfaces;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
namespace DatabaseCore.Models.Department
|
namespace DatabaseCore.Models.Department
|
||||||
@ -11,7 +13,7 @@ namespace DatabaseCore.Models.Department
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract]
|
[DataContract]
|
||||||
[EntityDescription("Discipline", "Дисципилна кафедры")]
|
[EntityDescription("Discipline", "Дисципилна кафедры")]
|
||||||
[EntityDependency("DisciplineBlock", "EmployeeId", "Сотрудник, отвечающий за аудиторию")]
|
[EntityDependency("DisciplineBlock", "DisciplineBlockId", "Блок дисцпилн, к которому относится дисциплина")]
|
||||||
public class Discipline : BaseEntity, IEntitySecurityExtenstion<Discipline>
|
public class Discipline : BaseEntity, IEntitySecurityExtenstion<Discipline>
|
||||||
{
|
{
|
||||||
[DataMember]
|
[DataMember]
|
||||||
@ -41,6 +43,9 @@ namespace DatabaseCore.Models.Department
|
|||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[ForeignKey("DisciplineId")]
|
||||||
|
public virtual List<AcademicPlanRecord> AcademicPlanRecords { get; set; }
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
public Discipline SecurityCheck(Discipline entity, bool allowFullData) => entity;
|
public Discipline SecurityCheck(Discipline entity, bool allowFullData) => entity;
|
||||||
|
@ -38,6 +38,9 @@ namespace DatabaseCore.Models.Department
|
|||||||
[ForeignKey("DisciplineBlockId")]
|
[ForeignKey("DisciplineBlockId")]
|
||||||
public virtual List<Discipline> Disciplines { get; set; }
|
public virtual List<Discipline> Disciplines { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("DisciplineBlockId")]
|
||||||
|
public virtual List<TimeNorm> TimeNorms { get; set; }
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
public DisciplineBlock SecurityCheck(DisciplineBlock entity, bool allowFullData) => entity;
|
public DisciplineBlock SecurityCheck(DisciplineBlock entity, bool allowFullData) => entity;
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
using ModuleTools.Attributes;
|
using ModuleTools.Attributes;
|
||||||
using ModuleTools.Interfaces;
|
using ModuleTools.Interfaces;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
namespace DatabaseCore.Models.Department
|
namespace DatabaseCore.Models.Department
|
||||||
@ -49,10 +51,13 @@ namespace DatabaseCore.Models.Department
|
|||||||
|
|
||||||
public virtual Lecturer Lecturer { get; set; }
|
public virtual Lecturer Lecturer { get; set; }
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
[ForeignKey("EducationDirectionId")]
|
||||||
|
public virtual List<AcademicPlan> AcademicPlans { get; set; }
|
||||||
|
|
||||||
public EducationDirection SecurityCheck(EducationDirection entity, bool allowFullData) => entity;
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public EducationDirection SecurityCheck(EducationDirection entity, bool allowFullData) => entity;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
using ModuleTools.Attributes;
|
||||||
|
using ModuleTools.Interfaces;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
|
namespace DatabaseCore.Models.Department
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Класс, описывающий норму времени
|
||||||
|
/// </summary>
|
||||||
|
[DataContract]
|
||||||
|
[EntityDescription("TimeNorm", "Норма времени")]
|
||||||
|
[EntityDependency("DisciplineBlock", "DisciplineBlockId", "Блок дисцпилн, к которому относится норма")]
|
||||||
|
public class TimeNorm : BaseEntity, IEntitySecurityExtenstion<TimeNorm>
|
||||||
|
{
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("DisciplineBlockId")]
|
||||||
|
public Guid DisciplineBlockId { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("TimeNormName")]
|
||||||
|
public string TimeNormName { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("TimeNormShortName")]
|
||||||
|
public string TimeNormShortName { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("TimeNormOrder")]
|
||||||
|
public int TimeNormOrder { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[MapConfiguration("TimeNormEducationDirectionQualification")]
|
||||||
|
public int? TimeNormEducationDirectionQualification { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("KindOfLoadName")]
|
||||||
|
public string KindOfLoadName { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[MapConfiguration("KindOfLoadAttributeName")]
|
||||||
|
public string KindOfLoadAttributeName { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[MapConfiguration("KindOfLoadBlueAsteriskName")]
|
||||||
|
public string KindOfLoadBlueAsteriskName { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[MapConfiguration("KindOfLoadBlueAsteriskAttributeName")]
|
||||||
|
public string KindOfLoadBlueAsteriskAttributeName { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[MapConfiguration("KindOfLoadBlueAsteriskPracticName")]
|
||||||
|
public string KindOfLoadBlueAsteriskPracticName { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[MapConfiguration("UseInLearningProgress")]
|
||||||
|
public bool UseInLearningProgress { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
[MapConfiguration("UseInSite")]
|
||||||
|
public bool UseInSite { get; set; }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public virtual DisciplineBlock DisciplineBlock { get; set; }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[ForeignKey("TimeNormId")]
|
||||||
|
public virtual List<AcademicPlanRecordTimeNormHour> AcademicPlanRecordTimeNormHours { get; set; }
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
public TimeNorm SecurityCheck(TimeNorm entity, bool allowFullData) => entity;
|
||||||
|
}
|
||||||
|
}
|
@ -17,6 +17,14 @@ GO
|
|||||||
DELETE FROM [DepartmentDatabasePortal].[dbo].[Posts];
|
DELETE FROM [DepartmentDatabasePortal].[dbo].[Posts];
|
||||||
GO
|
GO
|
||||||
DELETE FROM [DepartmentDatabasePortal].[dbo].[Lecturers];
|
DELETE FROM [DepartmentDatabasePortal].[dbo].[Lecturers];
|
||||||
|
GO
|
||||||
|
DELETE FROM [DepartmentDatabasePortal].[dbo].[TimeNorms];
|
||||||
|
GO
|
||||||
|
DELETE FROM [DepartmentDatabasePortal].[dbo].[AcademicPlans];
|
||||||
|
GO
|
||||||
|
DELETE FROM [DepartmentDatabasePortal].[dbo].[AcademicPlanRecords];
|
||||||
|
GO
|
||||||
|
DELETE FROM [DepartmentDatabasePortal].[dbo].[AcademicPlanRecordTimeNormHours];
|
||||||
GO";
|
GO";
|
||||||
|
|
||||||
private static readonly string classroomsMigration =
|
private static readonly string classroomsMigration =
|
||||||
@ -24,19 +32,24 @@ GO";
|
|||||||
|
|
||||||
SELECT @employeeId = emp.[Id] FROM [DepartmentDatabasePortal].[dbo].[Employees] emp
|
SELECT @employeeId = emp.[Id] FROM [DepartmentDatabasePortal].[dbo].[Employees] emp
|
||||||
|
|
||||||
INSERT INTO [DepartmentDatabasePortal].[dbo].[Classrooms]([Id],[Number],[EmployeeId],[ClassroomType],[Square],[Capacity],[HaveProjector],[SecurityCode],[DateCreate],[DateDelete],[IsDeleted])
|
INSERT INTO [DepartmentDatabasePortal].[dbo].[Classrooms]([Id],[Number],[EmployeeId],[ClassroomType],[Square],[Capacity],[HaveProjector],[SecurityCode],
|
||||||
|
[DateCreate],[DateDelete],[IsDeleted])
|
||||||
SELECT [Id],[Number],@employeeId,[ClassroomType],1,[Capacity],0,'-',[DateCreate],[DateDelete],[IsDeleted] FROM [DepartmentDatabaseContext].[dbo].[Classrooms]";
|
SELECT [Id],[Number],@employeeId,[ClassroomType],1,[Capacity],0,'-',[DateCreate],[DateDelete],[IsDeleted] FROM [DepartmentDatabaseContext].[dbo].[Classrooms]";
|
||||||
|
|
||||||
private static readonly string disciplineBlockMigration =
|
private static readonly string disciplineBlockMigration =
|
||||||
@"INSERT INTO [DepartmentDatabasePortal].[dbo].[DisciplineBlocks]([Id],[Title],[DisciplineBlockUseForGrouping],[DisciplineBlockOrder],[DisciplineBlockBlueAsteriskName],[DateCreate],[DateDelete],[IsDeleted])
|
@"INSERT INTO [DepartmentDatabasePortal].[dbo].[DisciplineBlocks]([Id],[Title],[DisciplineBlockUseForGrouping],[DisciplineBlockOrder],
|
||||||
SELECT [Id],[Title],[DisciplineBlockUseForGrouping],[DisciplineBlockOrder],[DisciplineBlockBlueAsteriskName],[DateCreate],[DateDelete],[IsDeleted] FROM [DepartmentDatabaseContext].[dbo].[DisciplineBlocks]";
|
[DisciplineBlockBlueAsteriskName],[DateCreate],[DateDelete],[IsDeleted])
|
||||||
|
SELECT [Id],[Title],[DisciplineBlockUseForGrouping],[DisciplineBlockOrder],[DisciplineBlockBlueAsteriskName],[DateCreate],[DateDelete],[IsDeleted] FROM
|
||||||
|
[DepartmentDatabaseContext].[dbo].[DisciplineBlocks]";
|
||||||
|
|
||||||
private static readonly string disciplineMigration =
|
private static readonly string disciplineMigration =
|
||||||
@"DELETE FROM [DepartmentDatabaseContext].[dbo].[Disciplines] WHERE [Id]='6CC684D5-900C-4278-AA43-0B83D0711C55' OR [Id]='A6598227-8449-4884-8290-13EABEC26924'
|
@"DELETE FROM [DepartmentDatabaseContext].[dbo].[Disciplines] WHERE [Id]='6CC684D5-900C-4278-AA43-0B83D0711C55' OR [Id]='A6598227-8449-4884-8290-13EABEC26924'
|
||||||
OR [Id]='4581ADC8-5A15-4F95-A40D-1607856ACB5C' OR [Id]='9DA4D810-025A-4A03-81FD-293DEF52FA4B' -- дублт в дисципдинах
|
OR [Id]='4581ADC8-5A15-4F95-A40D-1607856ACB5C' OR [Id]='9DA4D810-025A-4A03-81FD-293DEF52FA4B' -- дублт в дисципдинах
|
||||||
|
|
||||||
INSERT INTO [DepartmentDatabasePortal].[dbo].[Disciplines]([Id],[DisciplineBlockId],[DisciplineName],[DisciplineShortName],[Description],[DisciplineBlueAsteriskName],[DateCreate],[DateDelete],[IsDeleted])
|
INSERT INTO [DepartmentDatabasePortal].[dbo].[Disciplines]([Id],[DisciplineBlockId],[DisciplineName],[DisciplineShortName],[Description],
|
||||||
SELECT [Id],[DisciplineBlockId],[DisciplineName],[DisciplineShortName],[DisciplineDescription],[DisciplineBlueAsteriskName],[DateCreate],[DateDelete],[IsDeleted] FROM [DepartmentDatabaseContext].[dbo].[Disciplines]";
|
[DisciplineBlueAsteriskName],[DateCreate],[DateDelete],[IsDeleted])
|
||||||
|
SELECT [Id],[DisciplineBlockId],[DisciplineName],[DisciplineShortName],[DisciplineDescription],[DisciplineBlueAsteriskName],[DateCreate],[DateDelete],[IsDeleted]
|
||||||
|
FROM [DepartmentDatabaseContext].[dbo].[Disciplines]";
|
||||||
|
|
||||||
private static readonly string postMigration =
|
private static readonly string postMigration =
|
||||||
@"INSERT INTO [DepartmentDatabasePortal].[dbo].[Posts]([Id],[PostName],[Hours],[Order],[DateCreate],[DateDelete],[IsDeleted])
|
@"INSERT INTO [DepartmentDatabasePortal].[dbo].[Posts]([Id],[PostName],[Hours],[Order],[DateCreate],[DateDelete],[IsDeleted])
|
||||||
@ -47,16 +60,51 @@ SELECT [Id],[StudyPostTitle],[Hours],1,[DateCreate],[DateDelete],[IsDeleted] FRO
|
|||||||
|
|
||||||
SELECT @userId = u.[Id] FROM [DepartmentDatabasePortal].[dbo].[Users] u WHERE u.[UserName]='admin'
|
SELECT @userId = u.[Id] FROM [DepartmentDatabasePortal].[dbo].[Users] u WHERE u.[UserName]='admin'
|
||||||
|
|
||||||
INSERT INTO [DepartmentDatabasePortal].[dbo].[Lecturers]([Id],[UserId],[LastName],[FirstName],[Patronymic],[Abbreviation],[DateBirth],[Address],[Email],[MobileNumber],[HomeNumber],[Description],[Photo],[GroupElectricalSafety],[OnlyForPrivate],[DateCreate],[DateDelete],[IsDeleted])
|
INSERT INTO [DepartmentDatabasePortal].[dbo].[Lecturers]([Id],[UserId],[LastName],[FirstName],[Patronymic],[Abbreviation],[DateBirth],[Address],[Email],
|
||||||
SELECT [Id],@userId,[LastName],[FirstName],[Patronymic],[Abbreviation],[DateBirth],[Address],[Email],[MobileNumber],[HomeNumber],[Description],[Photo],'I',[OnlyForPrivate],[DateCreate],[DateDelete],[IsDeleted] FROM [DepartmentDatabaseContext].[dbo].[Lecturers]";
|
[MobileNumber],[HomeNumber],[Description],[Photo],[GroupElectricalSafety],[OnlyForPrivate],[DateCreate],[DateDelete],[IsDeleted])
|
||||||
|
SELECT [Id],@userId,[LastName],[FirstName],[Patronymic],[Abbreviation],[DateBirth],[Address],[Email],[MobileNumber],[HomeNumber],[Description],[Photo],'I',
|
||||||
|
[OnlyForPrivate],[DateCreate],[DateDelete],[IsDeleted] FROM [DepartmentDatabaseContext].[dbo].[Lecturers]";
|
||||||
|
|
||||||
private static readonly string educationdirectionrMigration =
|
private static readonly string educationdirectionrMigration =
|
||||||
@"DECLARE @lecturerId uniqueidentifier;
|
@"DECLARE @lecturerId uniqueidentifier;
|
||||||
|
|
||||||
SELECT @lecturerId = l.[Id] FROM [DepartmentDatabasePortal].[dbo].[Lecturers] l
|
SELECT @lecturerId = l.[Id] FROM [DepartmentDatabasePortal].[dbo].[Lecturers] l
|
||||||
|
|
||||||
INSERT INTO [DepartmentDatabasePortal].[dbo].[EducationDirections]([Id],[Cipher],[ShortName],[Title],[Profile],[Qualification],[LecturerId],[Description],[DateCreate],[DateDelete],[IsDeleted])
|
INSERT INTO [DepartmentDatabasePortal].[dbo].[EducationDirections]([Id],[Cipher],[ShortName],[Title],[Profile],[Qualification],[LecturerId],[Description],
|
||||||
SELECT [Id],[Cipher],[ShortName],[Title],[Profile],[Qualification],@lecturerId,[Description],[DateCreate],[DateDelete],[IsDeleted] FROM [DepartmentDatabaseContext].[dbo].[EducationDirections]";
|
[DateCreate],[DateDelete],[IsDeleted])
|
||||||
|
SELECT [Id],[Cipher],[ShortName],[Title],[Profile],[Qualification],@lecturerId,[Description],[DateCreate],[DateDelete],[IsDeleted] FROM
|
||||||
|
[DepartmentDatabaseContext].[dbo].[EducationDirections]";
|
||||||
|
|
||||||
|
private static readonly string timeNormMigration =
|
||||||
|
@"INSERT INTO [DepartmentDatabasePortal].[dbo].[TimeNorms]([Id],[DisciplineBlockId],[TimeNormName],[TimeNormShortName]
|
||||||
|
,[TimeNormOrder],[TimeNormEducationDirectionQualification],[KindOfLoadName],[KindOfLoadAttributeName],[KindOfLoadBlueAsteriskName]
|
||||||
|
,[KindOfLoadBlueAsteriskAttributeName],[KindOfLoadBlueAsteriskPracticName],[UseInLearningProgress],[UseInSite],[DateCreate],[DateDelete],[IsDeleted])
|
||||||
|
SELECT [Id],[DisciplineBlockId],[TimeNormName],[TimeNormShortName],[TimeNormOrder],[TimeNormEducationDirectionQualification],[KindOfLoadName]
|
||||||
|
,[KindOfLoadAttributeName],[KindOfLoadBlueAsteriskName],[KindOfLoadBlueAsteriskAttributeName],[KindOfLoadBlueAsteriskPracticName]
|
||||||
|
,[UseInLearningProgress],[UseInSite],[DateCreate],[DateDelete],[IsDeleted] FROM [DepartmentDatabaseContext].[dbo].[TimeNorms] WHERE
|
||||||
|
[AcademicYearId]='4FFC16B7-C1A5-47B1-B780-821ED70793DC'";
|
||||||
|
|
||||||
|
private static readonly string academicplanMigration =
|
||||||
|
@"INSERT INTO [DepartmentDatabasePortal].[dbo].[AcademicPlans]([Id],[EducationDirectionId],[YearEntrance],[YearFinish],[DateCreate],[DateDelete],[IsDeleted])
|
||||||
|
SELECT [Id],[EducationDirectionId],2020 + ABS(CHECKSUM(NEWID()) % 100),2024,[DateCreate],[DateDelete],[IsDeleted] FROM [DepartmentDatabaseContext].[dbo].[AcademicPlans] WHERE
|
||||||
|
[AcademicYearId]='4FFC16B7-C1A5-47B1-B780-821ED70793DC'";
|
||||||
|
|
||||||
|
private static readonly string academicplanrecordsMigration =
|
||||||
|
@"INSERT INTO [DepartmentDatabasePortal].[dbo].[AcademicPlanRecords]([Id],[AcademicPlanId],[DisciplineId],[InDepartment],[Semester],[Zet]
|
||||||
|
,[AcademicPlanRecordParentId],[IsParent],[IsFacultative],[DateCreate],[DateDelete],[IsDeleted])
|
||||||
|
SELECT apr.[Id],apr.[AcademicPlanId],apr.[DisciplineId],apr.[InDepartment],apr.[Semester],apr.[Zet],apr.[AcademicPlanRecordParentId],apr.[IsParent],apr.[IsFacultative]
|
||||||
|
,apr.[DateCreate],apr.[DateDelete],apr.[IsDeleted] FROM [DepartmentDatabaseContext].[dbo].[AcademicPlanRecords] apr
|
||||||
|
JOIN [DepartmentDatabaseContext].[dbo].[AcademicPlans] ap on apr.[AcademicPlanId]=ap.[Id] WHERE
|
||||||
|
ap.[AcademicYearId]='4FFC16B7-C1A5-47B1-B780-821ED70793DC'";
|
||||||
|
|
||||||
|
private static readonly string academicplanrecordhoursMigration =
|
||||||
|
@"INSERT INTO [DepartmentDatabasePortal].[dbo].[AcademicPlanRecordTimeNormHours]([Id],[AcademicPlanRecordId],[TimeNormId],[PlanHours],[DateCreate],[DateDelete],
|
||||||
|
[IsDeleted])
|
||||||
|
SELECT apre.[Id],apre.[AcademicPlanRecordId],apre.[TimeNormId],apre.[PlanHours],apre.[DateCreate],apre.[DateDelete],apre.[IsDeleted]
|
||||||
|
FROM [DepartmentDatabaseContext].[dbo].[AcademicPlanRecordElements] apre
|
||||||
|
JOIN [DepartmentDatabaseContext].[dbo].[AcademicPlanRecords] apr on apre.[AcademicPlanRecordId]=apr.[Id]
|
||||||
|
JOIN [DepartmentDatabaseContext].[dbo].[AcademicPlans] ap on apr.[AcademicPlanId]=ap.[Id] WHERE
|
||||||
|
ap.[AcademicYearId]='4FFC16B7-C1A5-47B1-B780-821ED70793DC'";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Перенос данных по безопасности
|
/// Перенос данных по безопасности
|
||||||
@ -72,6 +120,10 @@ SELECT [Id],[Cipher],[ShortName],[Title],[Profile],[Qualification],@lecturerId,[
|
|||||||
context.Database.ExecuteSqlRaw(postMigration, null);
|
context.Database.ExecuteSqlRaw(postMigration, null);
|
||||||
context.Database.ExecuteSqlRaw(lecturerMigration, null);
|
context.Database.ExecuteSqlRaw(lecturerMigration, null);
|
||||||
context.Database.ExecuteSqlRaw(educationdirectionrMigration, null);
|
context.Database.ExecuteSqlRaw(educationdirectionrMigration, null);
|
||||||
|
context.Database.ExecuteSqlRaw(timeNormMigration, null);
|
||||||
|
context.Database.ExecuteSqlRaw(academicplanMigration, null);
|
||||||
|
context.Database.ExecuteSqlRaw(academicplanrecordsMigration, null);
|
||||||
|
context.Database.ExecuteSqlRaw(academicplanrecordhoursMigration, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -31,6 +31,10 @@ namespace DesktopTools.BaseControls
|
|||||||
};
|
};
|
||||||
panelControl.Controls.Add(checkBoxNullable);
|
panelControl.Controls.Add(checkBoxNullable);
|
||||||
}
|
}
|
||||||
|
if (enumType.Name.StartsWith("Nullable"))
|
||||||
|
{
|
||||||
|
enumType = Nullable.GetUnderlyingType(enumType);
|
||||||
|
}
|
||||||
|
|
||||||
comboBox.Items.Clear();
|
comboBox.Items.Clear();
|
||||||
foreach (var val in Enum.GetValues(enumType))
|
foreach (var val in Enum.GetValues(enumType))
|
||||||
|
@ -431,6 +431,11 @@ namespace DesktopTools.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
await Task.Run(() => data = _businessLogic.GetList(model));
|
await Task.Run(() => data = _businessLogic.GetList(model));
|
||||||
|
if (data == null && _businessLogic.Errors.Count > 0)
|
||||||
|
{
|
||||||
|
DialogHelper.MessageException(_businessLogic.Errors, $"{Title}. Ошибки при получении данных");
|
||||||
|
return;
|
||||||
|
}
|
||||||
toolStripLabelCountPages.Text = $"из {data?.MaxCount}";
|
toolStripLabelCountPages.Text = $"из {data?.MaxCount}";
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -94,6 +94,14 @@ namespace ModuleTools.BusinessLogics
|
|||||||
}
|
}
|
||||||
if ((haveRigth && !customAttribute.AllowCopyWithoutRigth) || customAttribute.AllowCopyWithoutRigth)
|
if ((haveRigth && !customAttribute.AllowCopyWithoutRigth) || customAttribute.AllowCopyWithoutRigth)
|
||||||
{
|
{
|
||||||
|
if (property.PropertyType.Name.StartsWith("Nullable"))
|
||||||
|
{
|
||||||
|
if (Nullable.GetUnderlyingType(property.PropertyType).IsEnum)
|
||||||
|
{
|
||||||
|
property.SetValue(newObject, Enum.Parse(Nullable.GetUnderlyingType(property.PropertyType), value.ToString()));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
property.SetValue(newObject, value);
|
property.SetValue(newObject, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,18 +26,22 @@
|
|||||||
#region База
|
#region База
|
||||||
Кафедра = 100,
|
Кафедра = 100,
|
||||||
|
|
||||||
Должности = 101, // + должности
|
Должности = 101,
|
||||||
|
|
||||||
Сотрудники = 102, // + должности
|
Сотрудники = 102,
|
||||||
|
|
||||||
Аудитории = 103,
|
Аудитории = 103,
|
||||||
|
|
||||||
Дисциплины = 104, // + Блоки дисциплин
|
Дисциплины = 104, // + Блоки дисциплин
|
||||||
|
|
||||||
Преподаватели = 105, // + должности, звания
|
Преподаватели = 105, // + звания
|
||||||
|
|
||||||
НаправленияОбучений = 106,
|
НаправленияОбучений = 106,
|
||||||
|
|
||||||
|
НормыВремени = 107,
|
||||||
|
|
||||||
|
УчебныеПланы = 108,
|
||||||
|
|
||||||
Группы = 105, //
|
Группы = 105, //
|
||||||
|
|
||||||
Студенты = 106,
|
Студенты = 106,
|
||||||
@ -48,8 +52,6 @@
|
|||||||
// Меню Учебный процесс
|
// Меню Учебный процесс
|
||||||
Учебный_процесс = 150,
|
Учебный_процесс = 150,
|
||||||
|
|
||||||
Учебные_планы = 120,
|
|
||||||
|
|
||||||
Виды_нагрузок = 121,
|
Виды_нагрузок = 121,
|
||||||
|
|
||||||
Учебные_года = 122,
|
Учебные_года = 122,
|
||||||
@ -58,8 +60,6 @@
|
|||||||
|
|
||||||
Контингент = 123,
|
Контингент = 123,
|
||||||
|
|
||||||
Нормы_времени = 124,
|
|
||||||
|
|
||||||
Расчет_штатов = 125,
|
Расчет_штатов = 125,
|
||||||
|
|
||||||
Расчасовки = 127,
|
Расчасовки = 127,
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
using ModuleTools.Attributes;
|
||||||
|
using ModuleTools.BindingModels;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.BindingModels
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Получение учебного года
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanGetBindingModel : GetBindingModel
|
||||||
|
{
|
||||||
|
public Guid? EducationDirectionId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение учебного года
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanSetBindingModel : SetBindingModel
|
||||||
|
{
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("EducationDirectionId")]
|
||||||
|
public Guid EducationDirectionId { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("YearEntrance")]
|
||||||
|
public int YearEntrance { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("YearFinish")]
|
||||||
|
public int YearFinish { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
using DepartmentBusinessLogic.Enums;
|
||||||
|
using ModuleTools.Attributes;
|
||||||
|
using ModuleTools.BindingModels;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.BindingModels
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Получение записи учебного плана
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanRecordGetBindingModel : GetBindingModel
|
||||||
|
{
|
||||||
|
public Guid? AcademicPlanId { get; set; }
|
||||||
|
|
||||||
|
public Guid? DisciplineId { get; set; }
|
||||||
|
|
||||||
|
public Semester? Semester { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение записи учебного плана
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanRecordSetBindingModel : SetBindingModel
|
||||||
|
{
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("AcademicPlanId")]
|
||||||
|
public Guid AcademicPlanId { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("DisciplineId")]
|
||||||
|
public Guid DisciplineId { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("InDepartment")]
|
||||||
|
public bool InDepartment { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("Semester")]
|
||||||
|
public Semester Semester { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("Zet")]
|
||||||
|
public int Zet { get; set; }
|
||||||
|
|
||||||
|
[MapConfiguration("AcademicPlanRecordParentId")]
|
||||||
|
public Guid? AcademicPlanRecordParentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Является родительской для дисциплин по выбору
|
||||||
|
/// </summary>
|
||||||
|
[MapConfiguration("IsParent")]
|
||||||
|
public bool IsParent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Является факультативной дисциплиной
|
||||||
|
/// </summary>
|
||||||
|
[MapConfiguration("IsFacultative")]
|
||||||
|
public bool IsFacultative { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
using ModuleTools.Attributes;
|
||||||
|
using ModuleTools.BindingModels;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.BindingModels
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Получение часов по норме времени для записи учебного плана
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanRecordTimeNormHourGetBindingModel : GetBindingModel
|
||||||
|
{
|
||||||
|
public Guid? AcademicPlanRecordId { get; set; }
|
||||||
|
|
||||||
|
public Guid? TimeNormId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение часов по норме времени для записи учебного плана
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanRecordTimeNormHourSetBindingModel : SetBindingModel
|
||||||
|
{
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("AcademicPlanRecordId")]
|
||||||
|
public Guid AcademicPlanRecordId { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("TimeNormId")]
|
||||||
|
public Guid TimeNormId { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("PlanHours")]
|
||||||
|
public decimal PlanHours { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,73 @@
|
|||||||
|
using DepartmentBusinessLogic.Enums;
|
||||||
|
using ModuleTools.Attributes;
|
||||||
|
using ModuleTools.BindingModels;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.BindingModels
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Получение нормы времени
|
||||||
|
/// </summary>
|
||||||
|
public class TimeNormGetBindingModel : GetBindingModel
|
||||||
|
{
|
||||||
|
public Guid? DisciplineBlockId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Сохранение нормы времени
|
||||||
|
/// </summary>
|
||||||
|
public class TimeNormSetBindingModel : SetBindingModel
|
||||||
|
{
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("DisciplineBlockId")]
|
||||||
|
public Guid DisciplineBlockId { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("TimeNormName")]
|
||||||
|
public string TimeNormName { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("TimeNormShortName")]
|
||||||
|
public string TimeNormShortName { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("TimeNormOrder")]
|
||||||
|
public int TimeNormOrder { get; set; }
|
||||||
|
|
||||||
|
[MapConfiguration("TimeNormEducationDirectionQualification")]
|
||||||
|
public EducationDirectionQualification? TimeNormEducationDirectionQualification { get; set; }
|
||||||
|
|
||||||
|
[Required(ErrorMessage = "required")]
|
||||||
|
[MapConfiguration("KindOfLoadName")]
|
||||||
|
public string KindOfLoadName { get; set; }
|
||||||
|
|
||||||
|
[MapConfiguration("KindOfLoadAttributeName")]
|
||||||
|
public string KindOfLoadAttributeName { get; set; }
|
||||||
|
|
||||||
|
[MapConfiguration("KindOfLoadBlueAsteriskName")]
|
||||||
|
public string KindOfLoadBlueAsteriskName { get; set; }
|
||||||
|
|
||||||
|
[MapConfiguration("KindOfLoadBlueAsteriskAttributeName")]
|
||||||
|
public string KindOfLoadBlueAsteriskAttributeName { get; set; }
|
||||||
|
|
||||||
|
[MapConfiguration("KindOfLoadBlueAsteriskPracticName")]
|
||||||
|
public string KindOfLoadBlueAsteriskPracticName { get; set; }
|
||||||
|
|
||||||
|
[MapConfiguration("UseInLearningProgress")]
|
||||||
|
public bool UseInLearningProgress { get; set; }
|
||||||
|
|
||||||
|
[MapConfiguration("UseInSite")]
|
||||||
|
public bool UseInSite { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Код вида работ в справочнике видов работ в новой версии планов, чтобы потом искать работу в строках плана
|
||||||
|
/// </summary>
|
||||||
|
public string KindOfLoadBlueAsteriskCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Код вида практики в справочнике видов практик в новой версии планов, чтобы потом искать практику в строках плана
|
||||||
|
/// </summary>
|
||||||
|
public string KindOfLoadBlueAsteriskPracticCode { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.Interfaces;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using ModuleTools.BusinessLogics;
|
||||||
|
using ModuleTools.Enums;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.BusinessLogics
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы с учебными планами
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanBusinessLogic : GenericBusinessLogic<AcademicPlanGetBindingModel, AcademicPlanSetBindingModel, AcademicPlanListViewModel, AcademicPlanViewModel>
|
||||||
|
{
|
||||||
|
public AcademicPlanBusinessLogic(IAcademicPlanService service) : base(service, "Учебные Планы", AccessOperation.УчебныеПланы) { }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.Interfaces;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using ModuleTools.BusinessLogics;
|
||||||
|
using ModuleTools.Enums;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.BusinessLogics
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы с записями учебного плана
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanRecordBusinessLogic : GenericBusinessLogic<AcademicPlanRecordGetBindingModel, AcademicPlanRecordSetBindingModel, AcademicPlanRecordListViewModel, AcademicPlanRecordViewModel>
|
||||||
|
{
|
||||||
|
public AcademicPlanRecordBusinessLogic(IAcademicPlanRecordService service) : base(service, "Записи Учебных Планов", AccessOperation.УчебныеПланы) { }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.Interfaces;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using ModuleTools.BusinessLogics;
|
||||||
|
using ModuleTools.Enums;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.BusinessLogics
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы с часами нагрузок записей учебных планов
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanRecordTimeNormHourBusinessLogic : GenericBusinessLogic<AcademicPlanRecordTimeNormHourGetBindingModel, AcademicPlanRecordTimeNormHourSetBindingModel, AcademicPlanRecordTimeNormHourListViewModel, AcademicPlanRecordTimeNormHourViewModel>
|
||||||
|
{
|
||||||
|
public AcademicPlanRecordTimeNormHourBusinessLogic(IAcademicPlanRecordTimeNormHourService service) : base(service, "Часы Нагрузок Записей Учебных Планов", AccessOperation.УчебныеПланы) { }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.Interfaces;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using ModuleTools.BusinessLogics;
|
||||||
|
using ModuleTools.Enums;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.BusinessLogics
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика работы с нормами времени
|
||||||
|
/// </summary>
|
||||||
|
public class TimeNormBusinessLogic : GenericBusinessLogic<TimeNormGetBindingModel, TimeNormSetBindingModel, TimeNormListViewModel, TimeNormViewModel>
|
||||||
|
{
|
||||||
|
public TimeNormBusinessLogic(ITimeNormService service) : base(service, "Нормы Времени", AccessOperation.НормыВремени) { }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
namespace DepartmentBusinessLogic.Enums
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Семестр обучения
|
||||||
|
/// </summary>
|
||||||
|
public enum Semester
|
||||||
|
{
|
||||||
|
Первый = 1,
|
||||||
|
|
||||||
|
Второй = 2,
|
||||||
|
|
||||||
|
Третий = 3,
|
||||||
|
|
||||||
|
Четвертый = 4,
|
||||||
|
|
||||||
|
Пятый = 5,
|
||||||
|
|
||||||
|
Шестой = 6,
|
||||||
|
|
||||||
|
Седьмой = 7,
|
||||||
|
|
||||||
|
Восьмой = 8
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using ModuleTools.Interfaces;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Хранение записей учебного плана
|
||||||
|
/// </summary>
|
||||||
|
public interface IAcademicPlanRecordService : IGenerticEntityService<AcademicPlanRecordGetBindingModel, AcademicPlanRecordSetBindingModel> { }
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using ModuleTools.Interfaces;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Хранение часов нагрузки записи чебного плана
|
||||||
|
/// </summary>
|
||||||
|
public interface IAcademicPlanRecordTimeNormHourService : IGenerticEntityService<AcademicPlanRecordTimeNormHourGetBindingModel, AcademicPlanRecordTimeNormHourSetBindingModel> { }
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using ModuleTools.Interfaces;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Хранение учебных планов
|
||||||
|
/// </summary>
|
||||||
|
public interface IAcademicPlanService : IGenerticEntityService<AcademicPlanGetBindingModel, AcademicPlanSetBindingModel> { }
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using ModuleTools.Interfaces;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Хранение норм времени
|
||||||
|
/// </summary>
|
||||||
|
public interface ITimeNormService : IGenerticEntityService<TimeNormGetBindingModel, TimeNormSetBindingModel> { }
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
using DepartmentBusinessLogic.Enums;
|
||||||
|
using ModuleTools.Attributes;
|
||||||
|
using ModuleTools.Enums;
|
||||||
|
using ModuleTools.ViewModels;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.ViewModels
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Список часов по нагрузке для записи учебного плана
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanRecordTimeNormHourListViewModel : ListViewModel<AcademicPlanRecordTimeNormHourViewModel> { }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Элемент часов по нагрузке для записи учебного плана
|
||||||
|
/// </summary>
|
||||||
|
[ViewModelControlElementClass()]
|
||||||
|
public class AcademicPlanRecordTimeNormHourViewModel : ElementViewModel
|
||||||
|
{
|
||||||
|
[ViewModelControlElementProperty("Запись учебного плана", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanRecordList, DepartmentWindowsDesktop")]
|
||||||
|
[MapConfiguration("AcademicPlanRecordId")]
|
||||||
|
public Guid AcademicPlanRecordId { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Дисциплина")]
|
||||||
|
[MapConfiguration("AcademicPlanRecord.Discipline.DisciplineName", IsDifficle = true)]
|
||||||
|
public string DisciplineName { get; set; }
|
||||||
|
|
||||||
|
[MapConfiguration("AcademicPlanRecord.Semester", IsDifficle = true)]
|
||||||
|
public Semester Semester { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Семестр", ColumnWidth = 80)]
|
||||||
|
public string SemesterTitle => Semester.ToString("G");
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Норма времени", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlTimeNormList, DepartmentWindowsDesktop")]
|
||||||
|
[MapConfiguration("TimeNormId")]
|
||||||
|
public Guid TimeNormId { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Норма времени")]
|
||||||
|
[MapConfiguration("TimeNorm.TimeNormName", IsDifficle = true)]
|
||||||
|
public string TimeNormName { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Часы", ColumnWidth = 80)]
|
||||||
|
[ViewModelControlElementProperty("Часы", ControlType.ControlDecimal, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("PlanHours")]
|
||||||
|
public decimal PlanHours { get; set; }
|
||||||
|
|
||||||
|
public override string ToString() => $"{DisciplineName}({Semester}) - {TimeNormName}";
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
using DepartmentBusinessLogic.Enums;
|
||||||
|
using ModuleTools.Attributes;
|
||||||
|
using ModuleTools.Enums;
|
||||||
|
using ModuleTools.ViewModels;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.ViewModels
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Список аудиторий
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanRecordListViewModel : ListViewModel<AcademicPlanRecordViewModel> { }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Элемент аудитории
|
||||||
|
/// </summary>
|
||||||
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
||||||
|
[ViewModelControlElementDependenceEntity(Title = "Часы по нагрузкам", Order = 1, ParentPropertyName = "AcademicPlanRecordId",
|
||||||
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanRecordTimeNormHourList, DepartmentWindowsDesktop")]
|
||||||
|
public class AcademicPlanRecordViewModel : ElementViewModel
|
||||||
|
{
|
||||||
|
[ViewModelControlElementProperty("Учебный план", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanList, DepartmentWindowsDesktop")]
|
||||||
|
[MapConfiguration("AcademicPlanId")]
|
||||||
|
public Guid AcademicPlanId { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Дисциплина", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlDisciplineList, DepartmentWindowsDesktop")]
|
||||||
|
[MapConfiguration("DisciplineId")]
|
||||||
|
public Guid DisciplineId { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Дисциплина")]
|
||||||
|
[MapConfiguration("Discipline.DisciplineName", IsDifficle = true)]
|
||||||
|
public string DisciplineName { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Преподается на кафедре", ControlType.ControlBool, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("InDepartment")]
|
||||||
|
public bool InDepartment { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("На кафедре", ColumnWidth = 80)]
|
||||||
|
public string InDepartmentValue => InDepartment ? "Да" : "Нет";
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Семестр", ControlType.ControlEnum, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("Semester")]
|
||||||
|
public Semester Semester { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Семестр", ColumnWidth = 80)]
|
||||||
|
public string SemesterTitle => Semester.ToString("G");
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Зет", ColumnWidth = 60)]
|
||||||
|
[ViewModelControlElementProperty("Зет", ControlType.ControlInt, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("Zet")]
|
||||||
|
public int Zet { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Родитель", ControlType.ControlGuid, MustHaveValue = false, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanRecordList, DepartmentWindowsDesktop")]
|
||||||
|
[MapConfiguration("AcademicPlanRecordParentId")]
|
||||||
|
public Guid? AcademicPlanRecordParentId { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Является родительской", ControlType.ControlBool, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("IsParent")]
|
||||||
|
public bool IsParent { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("ДВ", ColumnWidth = 50)]
|
||||||
|
public string IsParentValue => IsParent ? "Да" : "Нет";
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("По выбору", ColumnWidth = 80)]
|
||||||
|
public string IsChildValue => AcademicPlanRecordParentId.HasValue ? "Да" : "Нет";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Является факультативной дисциплиной
|
||||||
|
/// </summary>
|
||||||
|
[ViewModelControlElementProperty("Является факультативной", ControlType.ControlBool, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("IsFacultative")]
|
||||||
|
public bool IsFacultative { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Факульт", ColumnWidth = 80)]
|
||||||
|
public string IsFacultativeValue => IsFacultative ? "Да" : "Нет";
|
||||||
|
|
||||||
|
public override string ToString() => $"{DisciplineName} - {SemesterTitle} семестр";
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
using ModuleTools.Attributes;
|
||||||
|
using ModuleTools.Enums;
|
||||||
|
using ModuleTools.ViewModels;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.ViewModels
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Список учбеных планов
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanListViewModel : ListViewModel<AcademicPlanViewModel> { }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Элемент учебного плана
|
||||||
|
/// </summary>
|
||||||
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
||||||
|
[ViewModelControlElementDependenceEntity(Title = "Записи плана", Order = 1, ParentPropertyName = "AcademicPlanId",
|
||||||
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanRecordList, DepartmentWindowsDesktop")]
|
||||||
|
public class AcademicPlanViewModel : ElementViewModel
|
||||||
|
{
|
||||||
|
[ViewModelControlElementProperty("Направление", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEducationDirectionList, DepartmentWindowsDesktop")]
|
||||||
|
[MapConfiguration("EducationDirectionId")]
|
||||||
|
public Guid EducationDirectionId { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Направление")]
|
||||||
|
[MapConfiguration("EducationDirection.Cipher", IsDifficle = true)]
|
||||||
|
public string EducationDirectionCipher { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Дата начала", ColumnWidth = 120)]
|
||||||
|
[ViewModelControlElementProperty("Дата начала", ControlType.ControlString, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("YearEntrance")]
|
||||||
|
public int YearEntrance { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Дата окончания", ColumnWidth = 120)]
|
||||||
|
[ViewModelControlElementProperty("Дата окончания", ControlType.ControlString, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("YearFinish")]
|
||||||
|
public int YearFinish { get; set; }
|
||||||
|
|
||||||
|
public override string ToString() =>$"{EducationDirectionCipher}: {YearEntrance}-{YearFinish}";
|
||||||
|
}
|
||||||
|
}
|
@ -15,6 +15,8 @@ namespace DepartmentBusinessLogic.ViewModels
|
|||||||
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
||||||
[ViewModelControlElementDependenceEntity(Title = "Дисципилны", Order = 1, ParentPropertyName = "DisciplineBlockId",
|
[ViewModelControlElementDependenceEntity(Title = "Дисципилны", Order = 1, ParentPropertyName = "DisciplineBlockId",
|
||||||
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlDisciplineList, DepartmentWindowsDesktop")]
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlDisciplineList, DepartmentWindowsDesktop")]
|
||||||
|
[ViewModelControlElementDependenceEntity(Title = "Нормы времени", Order = 1, ParentPropertyName = "DisciplineBlockId",
|
||||||
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlTimeNormList, DepartmentWindowsDesktop")]
|
||||||
public class DisciplineBlockViewModel : ElementViewModel
|
public class DisciplineBlockViewModel : ElementViewModel
|
||||||
{
|
{
|
||||||
[ViewModelControlListProperty("Название блока")]
|
[ViewModelControlListProperty("Название блока")]
|
||||||
|
@ -13,7 +13,9 @@ namespace DepartmentBusinessLogic.ViewModels
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Элемент дисциплина
|
/// Элемент дисциплина
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewModelControlElementClass()]
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
||||||
|
[ViewModelControlElementDependenceEntity(Title = "Записи учебного плана", Order = 1, ParentPropertyName = "DisciplineId",
|
||||||
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanRecordList, DepartmentWindowsDesktop")]
|
||||||
public class DisciplineViewModel : ElementViewModel
|
public class DisciplineViewModel : ElementViewModel
|
||||||
{
|
{
|
||||||
[ViewModelControlElementProperty("Блок дисциплин", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlDisciplineBlockList, DepartmentWindowsDesktop")]
|
[ViewModelControlElementProperty("Блок дисциплин", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlDisciplineBlockList, DepartmentWindowsDesktop")]
|
||||||
|
@ -14,7 +14,9 @@ namespace DepartmentBusinessLogic.ViewModels
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Элемент направления обучения
|
/// Элемент направления обучения
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewModelControlElementClass()]
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
||||||
|
[ViewModelControlElementDependenceEntity(Title = "Учебные планы", Order = 1, ParentPropertyName = "EducationDirectionId",
|
||||||
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanList, DepartmentWindowsDesktop")]
|
||||||
public class EducationDirectionViewModel : ElementViewModel
|
public class EducationDirectionViewModel : ElementViewModel
|
||||||
{
|
{
|
||||||
[ViewModelControlListProperty("Шифр", ColumnWidth = 80)]
|
[ViewModelControlListProperty("Шифр", ColumnWidth = 80)]
|
||||||
|
@ -0,0 +1,79 @@
|
|||||||
|
using DepartmentBusinessLogic.Enums;
|
||||||
|
using ModuleTools.Attributes;
|
||||||
|
using ModuleTools.Enums;
|
||||||
|
using ModuleTools.ViewModels;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace DepartmentBusinessLogic.ViewModels
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Список норм времени
|
||||||
|
/// </summary>
|
||||||
|
public class TimeNormListViewModel : ListViewModel<TimeNormViewModel> { }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Элемент нормы времени
|
||||||
|
/// </summary>
|
||||||
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
||||||
|
[ViewModelControlElementDependenceEntity(Title = "Нагрузки в планах", Order = 1, ParentPropertyName = "TimeNormId",
|
||||||
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanRecordTimeNormHourList, DepartmentWindowsDesktop")]
|
||||||
|
public class TimeNormViewModel : ElementViewModel
|
||||||
|
{
|
||||||
|
[ViewModelControlElementProperty("Блок дисциплин", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlDisciplineBlockList, DepartmentWindowsDesktop")]
|
||||||
|
[MapConfiguration("DisciplineBlockId")]
|
||||||
|
public Guid DisciplineBlockId { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Название")]
|
||||||
|
[ViewModelControlElementProperty("Название", ControlType.ControlString, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("TimeNormName")]
|
||||||
|
public string TimeNormName { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Сокращение", ColumnWidth = 100)]
|
||||||
|
[ViewModelControlElementProperty("Сокращение", ControlType.ControlString, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("TimeNormShortName")]
|
||||||
|
public string TimeNormShortName { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Порядок", ColumnWidth = 100)]
|
||||||
|
[ViewModelControlElementProperty("Порядок", ControlType.ControlInt, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("TimeNormOrder")]
|
||||||
|
public int TimeNormOrder { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Обучение", ControlType.ControlEnum, MustHaveValue = false)]
|
||||||
|
[MapConfiguration("TimeNormEducationDirectionQualification")]
|
||||||
|
public EducationDirectionQualification? TimeNormEducationDirectionQualification { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Обучение", ColumnWidth = 100)]
|
||||||
|
public string TimeNormEducationDirectionQualificationTitle => TimeNormEducationDirectionQualification?.ToString("G") ?? string.Empty;
|
||||||
|
|
||||||
|
[ViewModelControlListProperty("Тип нагрузки", ColumnWidth = 300)]
|
||||||
|
[ViewModelControlElementProperty("Тип нагрузки", ControlType.ControlString)]
|
||||||
|
[MapConfiguration("KindOfLoadName")]
|
||||||
|
public string KindOfLoadName { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Атрибут для поиска в старой версии", ControlType.ControlString)]
|
||||||
|
[MapConfiguration("KindOfLoadAttributeName")]
|
||||||
|
public string KindOfLoadAttributeName { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Название нагрузки в справочнике видов работ", ControlType.ControlString)]
|
||||||
|
[MapConfiguration("KindOfLoadBlueAsteriskName")]
|
||||||
|
public string KindOfLoadBlueAsteriskName { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Название нагрузки в справочнике видов работ", ControlType.ControlString)]
|
||||||
|
[MapConfiguration("KindOfLoadBlueAsteriskAttributeName")]
|
||||||
|
public string KindOfLoadBlueAsteriskAttributeName { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Название атрибута по которму извлекать часы", ControlType.ControlString)]
|
||||||
|
[MapConfiguration("KindOfLoadBlueAsteriskPracticName")]
|
||||||
|
public string KindOfLoadBlueAsteriskPracticName { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Учитывается в учебной нагрузке", ControlType.ControlBool, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("UseInLearningProgress")]
|
||||||
|
public bool UseInLearningProgress { get; set; }
|
||||||
|
|
||||||
|
[ViewModelControlElementProperty("Выводить для сайта", ControlType.ControlBool, MustHaveValue = true)]
|
||||||
|
[MapConfiguration("UseInSite")]
|
||||||
|
public bool UseInSite { get; set; }
|
||||||
|
|
||||||
|
public override string ToString() => TimeNormName;
|
||||||
|
}
|
||||||
|
}
|
@ -25,6 +25,12 @@ namespace DepartmentDatabaseImplementation
|
|||||||
DependencyManager.Instance.RegisterType<ILecturerPostService, LecturerPostService>();
|
DependencyManager.Instance.RegisterType<ILecturerPostService, LecturerPostService>();
|
||||||
|
|
||||||
DependencyManager.Instance.RegisterType<IEducationDirectionService, EducationDirectionService>();
|
DependencyManager.Instance.RegisterType<IEducationDirectionService, EducationDirectionService>();
|
||||||
|
|
||||||
|
DependencyManager.Instance.RegisterType<ITimeNormService, TimeNormService>();
|
||||||
|
|
||||||
|
DependencyManager.Instance.RegisterType<IAcademicPlanService, AcademicPlanService>();
|
||||||
|
DependencyManager.Instance.RegisterType<IAcademicPlanRecordService, AcademicPlanRecordService>();
|
||||||
|
DependencyManager.Instance.RegisterType<IAcademicPlanRecordTimeNormHourService, AcademicPlanRecordTimeNormHourService>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
using DatabaseCore;
|
||||||
|
using DatabaseCore.Models.Department;
|
||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.Interfaces;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using ModuleTools.Models;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace DepartmentDatabaseImplementation.Implementations
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Реализация IAcademicPlanRecordService
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanRecordService :
|
||||||
|
AbstractGenerticEntityService<AcademicPlanRecordGetBindingModel, AcademicPlanRecordSetBindingModel, AcademicPlanRecord, AcademicPlanRecordListViewModel, AcademicPlanRecordViewModel>,
|
||||||
|
IAcademicPlanRecordService
|
||||||
|
{
|
||||||
|
protected override OperationResultModel AdditionalCheckingWhenAdding(DbContext context, AcademicPlanRecordSetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
|
protected override OperationResultModel AdditionalCheckingWhenDeleting(DbContext context, AcademicPlanRecord entity, AcademicPlanRecordGetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
|
protected override IQueryable<AcademicPlanRecord> AdditionalCheckingWhenReadingList(IQueryable<AcademicPlanRecord> query, AcademicPlanRecordGetBindingModel model)
|
||||||
|
{
|
||||||
|
if (model.AcademicPlanId.HasValue)
|
||||||
|
{
|
||||||
|
query = query.Where(x => x.AcademicPlanId == model.AcademicPlanId.Value);
|
||||||
|
}
|
||||||
|
if (model.DisciplineId.HasValue)
|
||||||
|
{
|
||||||
|
query = query.Where(x => x.DisciplineId == model.DisciplineId.Value);
|
||||||
|
}
|
||||||
|
if (model.Semester.HasValue)
|
||||||
|
{
|
||||||
|
query = query.Where(x => x.Semester == (int)model.Semester.Value);
|
||||||
|
}
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override OperationResultModel AdditionalCheckingWhenUpdateing(DbContext context, AcademicPlanRecordSetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
|
protected override void AdditionalDeleting(DbContext context, AcademicPlanRecord entity, AcademicPlanRecordGetBindingModel model)
|
||||||
|
{
|
||||||
|
var hours = context.Set<AcademicPlanRecordTimeNormHour>().Where(x => x.AcademicPlanRecordId == model.Id);
|
||||||
|
foreach (var hour in hours)
|
||||||
|
{
|
||||||
|
hour.IsDeleted = true;
|
||||||
|
hour.DateDelete = DateTime.Now;
|
||||||
|
}
|
||||||
|
context.SaveChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override AcademicPlanRecord GetUniqueEntity(AcademicPlanRecordSetBindingModel model, DbContext context) => context.Set<AcademicPlanRecord>().FirstOrDefault(x => x.AcademicPlanId == model.AcademicPlanId && x.DisciplineId == model.DisciplineId && x.Semester == (int)model.Semester && x.Id != model.Id);
|
||||||
|
|
||||||
|
protected override IQueryable<AcademicPlanRecord> IncludingWhenReading(IQueryable<AcademicPlanRecord> query) => query.Include(x => x.AcademicPlan).Include(x => x.Discipline);
|
||||||
|
|
||||||
|
protected override IQueryable<AcademicPlanRecord> OrderingWhenReading(IQueryable<AcademicPlanRecord> query) =>
|
||||||
|
query.OrderBy(x => x.AcademicPlanId).ThenBy(x => x.Semester).ThenBy(x => x.AcademicPlanRecordParentId.HasValue || x.IsParent).ThenBy(x => x.AcademicPlanRecordParentId.HasValue).ThenBy(x => x.Discipline.DisciplineName);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
using DatabaseCore;
|
||||||
|
using DatabaseCore.Models.Department;
|
||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.Interfaces;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using ModuleTools.Models;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace DepartmentDatabaseImplementation.Implementations
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Реализация IAcademicPlanRecordTimeNormHourService
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanRecordTimeNormHourService :
|
||||||
|
AbstractGenerticEntityService<AcademicPlanRecordTimeNormHourGetBindingModel, AcademicPlanRecordTimeNormHourSetBindingModel, AcademicPlanRecordTimeNormHour, AcademicPlanRecordTimeNormHourListViewModel, AcademicPlanRecordTimeNormHourViewModel>,
|
||||||
|
IAcademicPlanRecordTimeNormHourService
|
||||||
|
{
|
||||||
|
protected override OperationResultModel AdditionalCheckingWhenAdding(DbContext context, AcademicPlanRecordTimeNormHourSetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
|
protected override OperationResultModel AdditionalCheckingWhenDeleting(DbContext context, AcademicPlanRecordTimeNormHour entity, AcademicPlanRecordTimeNormHourGetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
|
protected override IQueryable<AcademicPlanRecordTimeNormHour> AdditionalCheckingWhenReadingList(IQueryable<AcademicPlanRecordTimeNormHour> query, AcademicPlanRecordTimeNormHourGetBindingModel model)
|
||||||
|
{
|
||||||
|
if (model.AcademicPlanRecordId.HasValue)
|
||||||
|
{
|
||||||
|
query = query.Where(x => x.AcademicPlanRecordId == model.AcademicPlanRecordId.Value);
|
||||||
|
}
|
||||||
|
if (model.TimeNormId.HasValue)
|
||||||
|
{
|
||||||
|
query = query.Where(x => x.TimeNormId == model.TimeNormId.Value);
|
||||||
|
}
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override OperationResultModel AdditionalCheckingWhenUpdateing(DbContext context, AcademicPlanRecordTimeNormHourSetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
|
protected override void AdditionalDeleting(DbContext context, AcademicPlanRecordTimeNormHour entity, AcademicPlanRecordTimeNormHourGetBindingModel model) { }
|
||||||
|
|
||||||
|
protected override AcademicPlanRecordTimeNormHour GetUniqueEntity(AcademicPlanRecordTimeNormHourSetBindingModel model, DbContext context) => context.Set<AcademicPlanRecordTimeNormHour>().FirstOrDefault(x => x.AcademicPlanRecordId == model.AcademicPlanRecordId && x.TimeNormId == model.TimeNormId && x.Id != model.Id);
|
||||||
|
|
||||||
|
protected override IQueryable<AcademicPlanRecordTimeNormHour> IncludingWhenReading(IQueryable<AcademicPlanRecordTimeNormHour> query) => query.Include(x => x.AcademicPlanRecord).Include(x => x.AcademicPlanRecord.Discipline).Include(x => x.TimeNorm);
|
||||||
|
|
||||||
|
protected override IQueryable<AcademicPlanRecordTimeNormHour> OrderingWhenReading(IQueryable<AcademicPlanRecordTimeNormHour> query) => query.OrderBy(x => x.AcademicPlanRecord.Semester).ThenBy(x => x.AcademicPlanRecord.Discipline.DisciplineName).ThenBy(x => x.TimeNorm.TimeNormOrder);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
using DatabaseCore;
|
||||||
|
using DatabaseCore.Models.Department;
|
||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.Interfaces;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using ModuleTools.Models;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace DepartmentDatabaseImplementation.Implementations
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Реализация IAcademicPlanService
|
||||||
|
/// </summary>
|
||||||
|
public class AcademicPlanService :
|
||||||
|
AbstractGenerticEntityService<AcademicPlanGetBindingModel, AcademicPlanSetBindingModel, AcademicPlan, AcademicPlanListViewModel, AcademicPlanViewModel>,
|
||||||
|
IAcademicPlanService
|
||||||
|
{
|
||||||
|
protected override OperationResultModel AdditionalCheckingWhenAdding(DbContext context, AcademicPlanSetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
|
protected override OperationResultModel AdditionalCheckingWhenDeleting(DbContext context, AcademicPlan entity, AcademicPlanGetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
|
protected override IQueryable<AcademicPlan> AdditionalCheckingWhenReadingList(IQueryable<AcademicPlan> query, AcademicPlanGetBindingModel model)
|
||||||
|
{
|
||||||
|
if (model.EducationDirectionId.HasValue)
|
||||||
|
{
|
||||||
|
query = query.Where(x => x.EducationDirectionId == model.EducationDirectionId.Value);
|
||||||
|
}
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override OperationResultModel AdditionalCheckingWhenUpdateing(DbContext context, AcademicPlanSetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
|
protected override void AdditionalDeleting(DbContext context, AcademicPlan entity, AcademicPlanGetBindingModel model)
|
||||||
|
{
|
||||||
|
var records = context.Set<AcademicPlanRecord>().Where(x => x.AcademicPlanId == model.Id);
|
||||||
|
foreach (var record in records)
|
||||||
|
{
|
||||||
|
var hours = context.Set<AcademicPlanRecordTimeNormHour>().Where(x => x.AcademicPlanRecordId == record.Id);
|
||||||
|
foreach (var hour in hours)
|
||||||
|
{
|
||||||
|
hour.IsDeleted = true;
|
||||||
|
hour.DateDelete = DateTime.Now;
|
||||||
|
}
|
||||||
|
context.SaveChanges();
|
||||||
|
|
||||||
|
record.IsDeleted = true;
|
||||||
|
record.DateDelete = DateTime.Now;
|
||||||
|
}
|
||||||
|
context.SaveChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override AcademicPlan GetUniqueEntity(AcademicPlanSetBindingModel model, DbContext context) => context.Set<AcademicPlan>().FirstOrDefault(x => x.EducationDirectionId == model.EducationDirectionId && x.YearEntrance == model.YearEntrance && x.Id != model.Id);
|
||||||
|
|
||||||
|
protected override IQueryable<AcademicPlan> IncludingWhenReading(IQueryable<AcademicPlan> query) => query.Include(x => x.EducationDirection);
|
||||||
|
|
||||||
|
protected override IQueryable<AcademicPlan> OrderingWhenReading(IQueryable<AcademicPlan> query) => query.OrderBy(x => x.EducationDirection.Cipher).ThenBy(x => x.YearEntrance);
|
||||||
|
}
|
||||||
|
}
|
@ -25,6 +25,10 @@ namespace DepartmentDatabaseImplementation.Implementations
|
|||||||
{
|
{
|
||||||
return OperationResultModel.Error("Error:", "Есть дисциплины, относящиеся к этому блоку", ResultServiceStatusCode.ExsistItem);
|
return OperationResultModel.Error("Error:", "Есть дисциплины, относящиеся к этому блоку", ResultServiceStatusCode.ExsistItem);
|
||||||
}
|
}
|
||||||
|
if (context.Set<TimeNorm>().Any(x => x.DisciplineBlockId == model.Id && !x.IsDeleted))
|
||||||
|
{
|
||||||
|
return OperationResultModel.Error("Error:", "Есть нормы времени, относящиеся к этому блоку", ResultServiceStatusCode.ExsistItem);
|
||||||
|
}
|
||||||
return OperationResultModel.Success(null);
|
return OperationResultModel.Success(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ using DepartmentBusinessLogic.BindingModels;
|
|||||||
using DepartmentBusinessLogic.Interfaces;
|
using DepartmentBusinessLogic.Interfaces;
|
||||||
using DepartmentBusinessLogic.ViewModels;
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using ModuleTools.Enums;
|
||||||
using ModuleTools.Extensions;
|
using ModuleTools.Extensions;
|
||||||
using ModuleTools.Models;
|
using ModuleTools.Models;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -19,7 +20,14 @@ namespace DepartmentDatabaseImplementation.Implementations
|
|||||||
{
|
{
|
||||||
protected override OperationResultModel AdditionalCheckingWhenAdding(DbContext context, DisciplineSetBindingModel model) => OperationResultModel.Success(null);
|
protected override OperationResultModel AdditionalCheckingWhenAdding(DbContext context, DisciplineSetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
protected override OperationResultModel AdditionalCheckingWhenDeleting(DbContext context, Discipline entity, DisciplineGetBindingModel model) => OperationResultModel.Success(null);
|
protected override OperationResultModel AdditionalCheckingWhenDeleting(DbContext context, Discipline entity, DisciplineGetBindingModel model)
|
||||||
|
{
|
||||||
|
if (context.Set<AcademicPlanRecord>().Any(x => x.DisciplineId == model.Id && !x.IsDeleted))
|
||||||
|
{
|
||||||
|
return OperationResultModel.Error("Error:", "Есть записи учебного плана, относящиеся к этой дисциплине", ResultServiceStatusCode.ExsistItem);
|
||||||
|
}
|
||||||
|
return OperationResultModel.Success(null);
|
||||||
|
}
|
||||||
|
|
||||||
protected override IQueryable<Discipline> AdditionalCheckingWhenReadingList(IQueryable<Discipline> query, DisciplineGetBindingModel model)
|
protected override IQueryable<Discipline> AdditionalCheckingWhenReadingList(IQueryable<Discipline> query, DisciplineGetBindingModel model)
|
||||||
{
|
{
|
||||||
|
@ -4,6 +4,7 @@ using DepartmentBusinessLogic.BindingModels;
|
|||||||
using DepartmentBusinessLogic.Interfaces;
|
using DepartmentBusinessLogic.Interfaces;
|
||||||
using DepartmentBusinessLogic.ViewModels;
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using ModuleTools.Enums;
|
||||||
using ModuleTools.Models;
|
using ModuleTools.Models;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -19,7 +20,14 @@ namespace DepartmentDatabaseImplementation.Implementations
|
|||||||
{
|
{
|
||||||
protected override OperationResultModel AdditionalCheckingWhenAdding(DbContext context, EducationDirectionSetBindingModel model) => OperationResultModel.Success(null);
|
protected override OperationResultModel AdditionalCheckingWhenAdding(DbContext context, EducationDirectionSetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
protected override OperationResultModel AdditionalCheckingWhenDeleting(DbContext context, EducationDirection entity, EducationDirectionGetBindingModel model) => OperationResultModel.Success(null);
|
protected override OperationResultModel AdditionalCheckingWhenDeleting(DbContext context, EducationDirection entity, EducationDirectionGetBindingModel model)
|
||||||
|
{
|
||||||
|
if (context.Set<AcademicPlan>().Any(x => x.EducationDirectionId == model.Id && !x.IsDeleted))
|
||||||
|
{
|
||||||
|
return OperationResultModel.Error("Error:", "Есть учебные планы, относящиеся к этому направлению", ResultServiceStatusCode.ExsistItem);
|
||||||
|
}
|
||||||
|
return OperationResultModel.Success(null);
|
||||||
|
}
|
||||||
|
|
||||||
protected override IQueryable<EducationDirection> AdditionalCheckingWhenReadingList(IQueryable<EducationDirection> query, EducationDirectionGetBindingModel model)
|
protected override IQueryable<EducationDirection> AdditionalCheckingWhenReadingList(IQueryable<EducationDirection> query, EducationDirectionGetBindingModel model)
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ using System.Linq;
|
|||||||
namespace DepartmentDatabaseImplementation.Implementations
|
namespace DepartmentDatabaseImplementation.Implementations
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Реализация IEmployeePostService
|
/// Реализация IPostService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PostService :
|
public class PostService :
|
||||||
AbstractGenerticEntityService<PostGetBindingModel, PostSetBindingModel, Post, PostListViewModel, PostViewModel>,
|
AbstractGenerticEntityService<PostGetBindingModel, PostSetBindingModel, Post, PostListViewModel, PostViewModel>,
|
||||||
|
@ -0,0 +1,45 @@
|
|||||||
|
using DatabaseCore;
|
||||||
|
using DatabaseCore.Models.Department;
|
||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.Interfaces;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using ModuleTools.Models;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace DepartmentDatabaseImplementation.Implementations
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Реализация ITimeNormService
|
||||||
|
/// </summary>
|
||||||
|
public class TimeNormService :
|
||||||
|
AbstractGenerticEntityService<TimeNormGetBindingModel, TimeNormSetBindingModel, TimeNorm, TimeNormListViewModel, TimeNormViewModel>,
|
||||||
|
ITimeNormService
|
||||||
|
{
|
||||||
|
protected override OperationResultModel AdditionalCheckingWhenAdding(DbContext context, TimeNormSetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
|
protected override OperationResultModel AdditionalCheckingWhenDeleting(DbContext context, TimeNorm entity, TimeNormGetBindingModel model)
|
||||||
|
{
|
||||||
|
return OperationResultModel.Success(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override IQueryable<TimeNorm> AdditionalCheckingWhenReadingList(IQueryable<TimeNorm> query, TimeNormGetBindingModel model)
|
||||||
|
{
|
||||||
|
if (model.DisciplineBlockId.HasValue)
|
||||||
|
{
|
||||||
|
query = query.Where(x => x.DisciplineBlockId == model.DisciplineBlockId.Value);
|
||||||
|
}
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override OperationResultModel AdditionalCheckingWhenUpdateing(DbContext context, TimeNormSetBindingModel model) => OperationResultModel.Success(null);
|
||||||
|
|
||||||
|
protected override void AdditionalDeleting(DbContext context, TimeNorm entity, TimeNormGetBindingModel model) { }
|
||||||
|
|
||||||
|
protected override TimeNorm GetUniqueEntity(TimeNormSetBindingModel model, DbContext context) => context.Set<TimeNorm>().FirstOrDefault(x => x.TimeNormName == model.TimeNormName && x.TimeNormShortName == model.TimeNormShortName && x.Id != model.Id);
|
||||||
|
|
||||||
|
protected override IQueryable<TimeNorm> IncludingWhenReading(IQueryable<TimeNorm> query) => query.Include(x => x.DisciplineBlock);
|
||||||
|
|
||||||
|
protected override IQueryable<TimeNorm> OrderingWhenReading(IQueryable<TimeNorm> query) => query.OrderBy(x => x.TimeNormOrder);
|
||||||
|
}
|
||||||
|
}
|
@ -40,7 +40,9 @@ namespace DepartmentWindowsDesktop
|
|||||||
new ControlLecturerAcademicDegreeList(),
|
new ControlLecturerAcademicDegreeList(),
|
||||||
new ControlLecturerAcademicRankList(),
|
new ControlLecturerAcademicRankList(),
|
||||||
new ControlLecturerList(),
|
new ControlLecturerList(),
|
||||||
new ControlEducationDirectionList()
|
new ControlEducationDirectionList(),
|
||||||
|
new ControlTimeNormList(),
|
||||||
|
new ControlAcademicPlanList()
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var cntrl in _controls)
|
foreach (var cntrl in _controls)
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
partial class ControlAcademicPlanElement
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Освободить все используемые ресурсы.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Код, автоматически созданный конструктором компонентов
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Требуемый метод для поддержки конструктора — не изменяйте
|
||||||
|
/// содержимое этого метода с помощью редактора кода.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.BusinessLogics;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using DesktopTools.Controls;
|
||||||
|
using DesktopTools.Interfaces;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Реализация контрола для учебного плана
|
||||||
|
/// </summary>
|
||||||
|
public partial class ControlAcademicPlanElement :
|
||||||
|
GenericControlEntityElement<AcademicPlanGetBindingModel, AcademicPlanSetBindingModel, AcademicPlanListViewModel, AcademicPlanViewModel, AcademicPlanBusinessLogic>,
|
||||||
|
IGenericControlEntityElement
|
||||||
|
{
|
||||||
|
public ControlAcademicPlanElement()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Title = "Учебный план";
|
||||||
|
ControlId = new Guid("bdba8fca-4c38-49cf-89b0-4906c4aa7aa3");
|
||||||
|
_genericControlViewEntityElement = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IControl GetInstanceGenericControl() => new ControlAcademicPlanElement() { ControlId = Guid.NewGuid() };
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
partial class ControlAcademicPlanList
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Освободить все используемые ресурсы.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Код, автоматически созданный конструктором компонентов
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Требуемый метод для поддержки конструктора — не изменяйте
|
||||||
|
/// содержимое этого метода с помощью редактора кода.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.BusinessLogics;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using DesktopTools.Controls;
|
||||||
|
using DesktopTools.Enums;
|
||||||
|
using DesktopTools.Interfaces;
|
||||||
|
using DesktopTools.Models;
|
||||||
|
using ModuleTools.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Реализация контрола для списка учебных планов
|
||||||
|
/// </summary>
|
||||||
|
public partial class ControlAcademicPlanList :
|
||||||
|
GenericControlEntityList<AcademicPlanGetBindingModel, AcademicPlanSetBindingModel, AcademicPlanListViewModel, AcademicPlanViewModel, AcademicPlanBusinessLogic>,
|
||||||
|
IGenericControlEntityList
|
||||||
|
{
|
||||||
|
public ControlAcademicPlanList()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Title = "Учебнве планы";
|
||||||
|
ControlId = new Guid("144d098c-ff55-4786-ae63-3105a92990cd");
|
||||||
|
AccessOperation = AccessOperation.УчебныеПланы;
|
||||||
|
ControlViewEntityElement = new ControlAcademicPlanElement();
|
||||||
|
_genericControlViewEntityList = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IControl GetInstanceGenericControl() => new ControlAcademicPlanList() { ControlId = Guid.NewGuid() };
|
||||||
|
|
||||||
|
public ControlViewEntityListConfiguration GetConfigControl() => new()
|
||||||
|
{
|
||||||
|
PaginationOn = false,
|
||||||
|
HideToolStripButton = new List<ToolStripButtonListNames>
|
||||||
|
{
|
||||||
|
ToolStripButtonListNames.toolStripButtonSearch
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
partial class ControlAcademicPlanRecordElement
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Освободить все используемые ресурсы.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Код, автоматически созданный конструктором компонентов
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Требуемый метод для поддержки конструктора — не изменяйте
|
||||||
|
/// содержимое этого метода с помощью редактора кода.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.BusinessLogics;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using DesktopTools.Controls;
|
||||||
|
using DesktopTools.Interfaces;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Реализация контрола для записи учебного плана
|
||||||
|
/// </summary>
|
||||||
|
public partial class ControlAcademicPlanRecordElement :
|
||||||
|
GenericControlEntityElement<AcademicPlanRecordGetBindingModel, AcademicPlanRecordSetBindingModel, AcademicPlanRecordListViewModel, AcademicPlanRecordViewModel, AcademicPlanRecordBusinessLogic>,
|
||||||
|
IGenericControlEntityElement
|
||||||
|
{
|
||||||
|
public ControlAcademicPlanRecordElement()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Title = "Запись учебного планаs";
|
||||||
|
ControlId = new Guid("0b6a43e8-c9a6-42c0-a3f3-f7e75b16d2f4");
|
||||||
|
_genericControlViewEntityElement = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IControl GetInstanceGenericControl() => new ControlAcademicPlanRecordElement() { ControlId = Guid.NewGuid() };
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
partial class ControlAcademicPlanRecordList
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Освободить все используемые ресурсы.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Код, автоматически созданный конструктором компонентов
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Требуемый метод для поддержки конструктора — не изменяйте
|
||||||
|
/// содержимое этого метода с помощью редактора кода.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.BusinessLogics;
|
||||||
|
using DepartmentBusinessLogic.Enums;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using DesktopTools.Controls;
|
||||||
|
using DesktopTools.Enums;
|
||||||
|
using DesktopTools.Interfaces;
|
||||||
|
using DesktopTools.Models;
|
||||||
|
using ModuleTools.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Реализация контрола для записей учебного плана
|
||||||
|
/// </summary>
|
||||||
|
public partial class ControlAcademicPlanRecordList :
|
||||||
|
GenericControlEntityList<AcademicPlanRecordGetBindingModel, AcademicPlanRecordSetBindingModel, AcademicPlanRecordListViewModel, AcademicPlanRecordViewModel, AcademicPlanRecordBusinessLogic>,
|
||||||
|
IGenericControlEntityList
|
||||||
|
{
|
||||||
|
public ControlAcademicPlanRecordList()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Title = "Записи учебного плана";
|
||||||
|
ControlId = new Guid("6513cc00-4ac1-4420-b941-dcd199faecad");
|
||||||
|
AccessOperation = AccessOperation.Аудитории;
|
||||||
|
ControlViewEntityElement = new ControlAcademicPlanRecordElement();
|
||||||
|
_genericControlViewEntityList = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IControl GetInstanceGenericControl() => new ControlAcademicPlanRecordList() { ControlId = Guid.NewGuid() };
|
||||||
|
|
||||||
|
public ControlViewEntityListConfiguration GetConfigControl() => new()
|
||||||
|
{
|
||||||
|
PaginationOn = true,
|
||||||
|
PageNamesForPagination = Enum.GetValues(typeof(Semester)).OfType<Semester>().ToList().Select(x =>
|
||||||
|
new PageNamesForPaginationModel
|
||||||
|
{
|
||||||
|
Key = x,
|
||||||
|
Value = x.ToString()
|
||||||
|
})?.ToList(),
|
||||||
|
HideToolStripButton = new List<ToolStripButtonListNames>
|
||||||
|
{
|
||||||
|
ToolStripButtonListNames.toolStripButtonSearch
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
partial class ControlAcademicPlanRecordTimeNormHourElement
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Освободить все используемые ресурсы.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Код, автоматически созданный конструктором компонентов
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Требуемый метод для поддержки конструктора — не изменяйте
|
||||||
|
/// содержимое этого метода с помощью редактора кода.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.BusinessLogics;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using DesktopTools.Controls;
|
||||||
|
using DesktopTools.Interfaces;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Реализация контрола для часов нагрузки записи учебного плана
|
||||||
|
/// </summary>
|
||||||
|
public partial class ControlAcademicPlanRecordTimeNormHourElement :
|
||||||
|
GenericControlEntityElement<AcademicPlanRecordTimeNormHourGetBindingModel, AcademicPlanRecordTimeNormHourSetBindingModel, AcademicPlanRecordTimeNormHourListViewModel, AcademicPlanRecordTimeNormHourViewModel, AcademicPlanRecordTimeNormHourBusinessLogic>,
|
||||||
|
IGenericControlEntityElement
|
||||||
|
{
|
||||||
|
public ControlAcademicPlanRecordTimeNormHourElement()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Title = "Часы нагрузки записи учебного плана";
|
||||||
|
ControlId = new Guid("3c2d4cca-2b04-4207-96ff-3ffa7f9b5584");
|
||||||
|
_genericControlViewEntityElement = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IControl GetInstanceGenericControl() => new ControlAcademicPlanRecordTimeNormHourElement() { ControlId = Guid.NewGuid() };
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
partial class ControlAcademicPlanRecordTimeNormHourList
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Обязательная переменная конструктора.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Освободить все используемые ресурсы.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Код, автоматически созданный конструктором компонентов
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Требуемый метод для поддержки конструктора — не изменяйте
|
||||||
|
/// содержимое этого метода с помощью редактора кода.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.BusinessLogics;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using DesktopTools.Controls;
|
||||||
|
using DesktopTools.Enums;
|
||||||
|
using DesktopTools.Interfaces;
|
||||||
|
using DesktopTools.Models;
|
||||||
|
using ModuleTools.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
public partial class ControlAcademicPlanRecordTimeNormHourList :
|
||||||
|
GenericControlEntityList<AcademicPlanRecordTimeNormHourGetBindingModel, AcademicPlanRecordTimeNormHourSetBindingModel, AcademicPlanRecordTimeNormHourListViewModel, AcademicPlanRecordTimeNormHourViewModel, AcademicPlanRecordTimeNormHourBusinessLogic>,
|
||||||
|
IGenericControlEntityList
|
||||||
|
{
|
||||||
|
public ControlAcademicPlanRecordTimeNormHourList()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Title = "Часы нагрузок записи учебного плана";
|
||||||
|
ControlId = new Guid("c23a7c9c-af28-4d59-b378-50f59678a7f7");
|
||||||
|
AccessOperation = AccessOperation.УчебныеПланы;
|
||||||
|
ControlViewEntityElement = new ControlAcademicPlanRecordTimeNormHourElement();
|
||||||
|
_genericControlViewEntityList = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IControl GetInstanceGenericControl() => new ControlAcademicPlanRecordTimeNormHourList() { ControlId = Guid.NewGuid() };
|
||||||
|
|
||||||
|
public ControlViewEntityListConfiguration GetConfigControl() => new()
|
||||||
|
{
|
||||||
|
PaginationOn = false,
|
||||||
|
HideToolStripButton = new List<ToolStripButtonListNames>
|
||||||
|
{
|
||||||
|
ToolStripButtonListNames.toolStripButtonSearch
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
partial class ControlTimeNormElement
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Освободить все используемые ресурсы.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Код, автоматически созданный конструктором компонентов
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Требуемый метод для поддержки конструктора — не изменяйте
|
||||||
|
/// содержимое этого метода с помощью редактора кода.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.BusinessLogics;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using DesktopTools.Controls;
|
||||||
|
using DesktopTools.Interfaces;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Реализация контрола для нормы времени
|
||||||
|
/// </summary>
|
||||||
|
public partial class ControlTimeNormElement :
|
||||||
|
GenericControlEntityElement<TimeNormGetBindingModel, TimeNormSetBindingModel, TimeNormListViewModel, TimeNormViewModel, TimeNormBusinessLogic>,
|
||||||
|
IGenericControlEntityElement
|
||||||
|
{
|
||||||
|
public ControlTimeNormElement()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Title = "Норма времени";
|
||||||
|
ControlId = new Guid("17e65fa1-e809-45fe-b21c-dbd2ecd53194");
|
||||||
|
_genericControlViewEntityElement = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IControl GetInstanceGenericControl() => new ControlTimeNormElement() { ControlId = Guid.NewGuid() };
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
partial class ControlTimeNormList
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Освободить все используемые ресурсы.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Код, автоматически созданный конструктором компонентов
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Требуемый метод для поддержки конструктора — не изменяйте
|
||||||
|
/// содержимое этого метода с помощью редактора кода.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
using DepartmentBusinessLogic.BindingModels;
|
||||||
|
using DepartmentBusinessLogic.BusinessLogics;
|
||||||
|
using DepartmentBusinessLogic.ViewModels;
|
||||||
|
using DesktopTools.Controls;
|
||||||
|
using DesktopTools.Enums;
|
||||||
|
using DesktopTools.Interfaces;
|
||||||
|
using DesktopTools.Models;
|
||||||
|
using ModuleTools.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace DepartmentWindowsDesktop.EntityControls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Реализация контрола для списка норм времени
|
||||||
|
/// </summary>
|
||||||
|
public partial class ControlTimeNormList :
|
||||||
|
GenericControlEntityList<TimeNormGetBindingModel, TimeNormSetBindingModel, TimeNormListViewModel, TimeNormViewModel, TimeNormBusinessLogic>,
|
||||||
|
IGenericControlEntityList
|
||||||
|
{
|
||||||
|
public ControlTimeNormList()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
Title = "Нормы времени";
|
||||||
|
ControlId = new Guid("973e071f-b47a-4eef-bec6-6cbc63ecb5f5");
|
||||||
|
AccessOperation = AccessOperation.НормыВремени;
|
||||||
|
ControlViewEntityElement = new ControlTimeNormElement();
|
||||||
|
_genericControlViewEntityList = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IControl GetInstanceGenericControl() => new ControlTimeNormList() { ControlId = Guid.NewGuid() };
|
||||||
|
|
||||||
|
public ControlViewEntityListConfiguration GetConfigControl() => new()
|
||||||
|
{
|
||||||
|
PaginationOn = false,
|
||||||
|
HideToolStripButton = new List<ToolStripButtonListNames>
|
||||||
|
{
|
||||||
|
ToolStripButtonListNames.toolStripButtonSearch
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
Loading…
Reference in New Issue
Block a user