コード例 #1
0
 protected void Clear(object sender, EventArgs e)
 {
     ProgramID.Text   = "";
     ProgramName.Text = "";
     DiplomaName.Text = "";
     SchoolCode.ClearSelection();
     Tuition.Text = "";
     InternationalTuition.Text = "";
 }
コード例 #2
0
        public void Constructor_Should_Throw_Exception_When_Code_Is_Null_Or_Empty(string value)
        {
            //Arrange
            var code          = new SchoolCode(value);
            var schoolBuilder = _aSchool.But().With(code);

            //Act
            Action school = () => schoolBuilder.Build();

            //Assert
            school.Should().Throw <NullReferenceException>();
        }
コード例 #3
0
 protected void BindSchoolsList()
 {
     try
     {
         SchoolsController sysmgr = new SchoolsController();
         List <Schools>    info   = null;
         info = sysmgr.List();
         info.Sort((x, y) => x.SchoolName.CompareTo(y.SchoolName));
         SchoolCode.DataSource     = info;
         SchoolCode.DataTextField  = nameof(Schools.SchoolName);
         SchoolCode.DataValueField = nameof(Schools.SchoolCode);
         SchoolCode.DataBind();
         ListItem myitem = new ListItem();
         myitem.Value = "0";
         myitem.Text  = "select...";
         SchoolCode.Items.Insert(0, myitem);
     }
     catch (Exception ex)
     {
         ShowMessage(GetInnerException(ex).ToString(), "alert alert-danger");
     }
 }
コード例 #4
0
ファイル: School.cs プロジェクト: HosseinAbbasabadi/Monop
        public School(SchoolId id, SchoolName name, SchoolCode code, SchoolRegion region, SchoolRound round,
                      SchoolContactInfo contactInfo,
                      int sex, string fields, int academicYear,
                      HeadMaster headMaster, SchoolTypeId schoolType, SchoolTermId schoolTerm, int nature,
                      string description, long studentsCount) : base(id)
        {
            Validate(name.Value, code.Value, region.Value, round.Value, academicYear, nature);

            Name          = name;
            Code          = code;
            Region        = region;
            Round         = round;
            Sex           = sex;
            Fields        = fields;
            AcademicYear  = academicYear;
            HeadMaster    = headMaster;
            SchoolType    = schoolType;
            SchoolTerm    = schoolTerm;
            Nature        = nature;
            Description   = description;
            StudentsCount = studentsCount;
            ContactInfo   = contactInfo;
        }
コード例 #5
0
 public SchoolTestBuilder With(SchoolCode code)
 {
     Code = code;
     return(this);
 }
コード例 #6
0
 public SchoolInfo(int schoolSN, SchoolCode schoolCode, string schoolRealName)
 {
     this._n4SchoolSN        = schoolSN;
     this._SchoolCode        = schoolCode;
     this._strSchoolRealName = schoolRealName;
 }