Пример #1
0
        public CR_RegistrationDataTable CrRegistration_create(int rowCount = 1)
        {
            var dt = new CR_RegistrationDataTable();

            if (rowCount < 0)
            {
                rowCount = 0;
            }

            for (int i = 0; i < rowCount; i++)
            {
                var row = dt.newTypedRow();
                row.ns_AssignNewId();
                dt.addTypedRow(row);
            }
            return(dt);
        }
Пример #2
0
        public CR_RegistrationDataTable CrRegistration_createWithClassId(string classId, int rowCount = 1)
        {
            var dt = new CR_RegistrationDataTable();

            if (rowCount < 0)
            {
                rowCount = 0;
            }

            for (int i = 0; i < rowCount; i++)
            {
                var row = dt.newTypedRow();
                row.ns_AssignNewId();
                row.CRR_ClassId = classId;
                dt.addTypedRow(row);
            }

            if (!classId.isNullOrEmpty())
            {
                dt.ns_linkColumns(
                    AppDataName.CRR_ClassCode_XX,
                    AppDataName.CRR_ClassDate_XX,
                    AppDataName.CRR_ClassTime_XX,
                    AppDataName.CRR_CourseCode_XX,
                    AppDataName.CRR_CourseDesc_XX,
                    AppDataName.CRR_CourseEnable_XX,
                    AppDataName.CRR_CourseEnableName_XX,
                    AppDataName.CRR_CourseId_XX,
                    AppDataName.CRR_CourseName_XX,
                    AppDataName.CRR_LimitQty_XX,
                    AppDataName.CRR_RegisterQty_XX,
                    AppDataName.CRR_StartDate_XX,
                    AppDataName.CRR_EndDate_XX,
                    AppDataName.CRR_RegisterStartDate_XX,
                    AppDataName.CRR_RegisterEndDate_XX,
                    AppDataName.CRR_DietServcie_XX,
                    AppDataName.CRR_DietServiceName_XX
                    );
            }
            return(dt);
        }