コード例 #1
0
        }     //End private void Validate_ID()

        private void Validate_SENTRA_NAME()
        {
            Boolean bIsvalid = true;

            //[SENTRA_NAME] - Required
            if ((oViewModel.SENTRA_NAME == "") || (oViewModel.SENTRA_NAME == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "SENTRA_NAME1";
                oMSG.VAL_ERRMSG = "Nama sentra harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if

            //[SENTRA_NAME] - Unique
            //if (oDS.isExists_SENTRA_NAME(oViewModel.SENTRA_NAME))
            //{
            //    bIsvalid = false;
            //    ValidationMSG_VM oMSG = new ValidationMSG_VM();
            //    oMSG.VAL_ERRID = "SENTRA_NAME2";
            //    oMSG.VAL_ERRMSG = "SENTRA_NAME " + oViewModel.SENTRA_NAME + " sudah digunakan";
            //    aValidationMSG.Add(oMSG);
            //} //End if

            //[SENTRA_NAME] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "SENTRA_NAME0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_SENTRA_NAME()
コード例 #2
0
        }     //End private void Validate_RES_ID()

        private void Validate_RES_XID1()
        {
            Boolean bIsvalid = true;

            //[RES_XID1] - Required
            if ((oViewModel.RES_XID1 == "") || (oViewModel.RES_XID1 == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "RES_XID11";
                oMSG.VAL_ERRMSG = "No. Absen harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if
            //[RES_XID1] - Unique
            if (oDS.isExists_RES_XID1(oViewModel.RES_XID1))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "RES_XID12";
                oMSG.VAL_ERRMSG = "No. Absen " + oViewModel.RES_XID1 + " sudah digunakan";
                aValidationMSG.Add(oMSG);
            } //End if

            //[RES_XID1] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "RES_XID10";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_RES_XID1()
コード例 #3
0
        } //End private void Validate_USR_PSWD_CPAR()
        private void Validate_IMG_SRC()
        {
            Boolean bIsvalid = true;
            Int64 nMaxsize = 1048576; //(1024*1024) = 1MB

            //[IMG_SRC] - Require JPG file format
            if (oFileimage.ContentType != "image/jpeg")
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID = "IMG_SRC1";
                oMSG.VAL_ERRMSG = "Format foto harus JPG";
                aValidationMSG.Add(oMSG);
            } //End if
            //[IMG_SRC] - max size 512KB
            if (oFileimage.ContentLength > nMaxsize)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID = "IMG_SRC2";
                oMSG.VAL_ERRMSG = "Ukuran foto maximal 1MB";
                aValidationMSG.Add(oMSG);
            } //End if

            //[IMG_SRC] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID = "IMG_SRC0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        } //End private void Validate_IMG_SRC()
コード例 #4
0
ファイル: CPARPRIV_Validation.cs プロジェクト: arinsuga/actup
        }     //End private void Validate_AUDIT_RUID()

        private void Validate_STDREF_RUID()
        {
            Boolean bIsvalid = true;

            //[STDREF_LIST] - Required
            if (oViewModel.STDREF_LIST == null)
            {
                bIsvalid = false;
            }                                                         //End if (oViewModel.STDREF_LIST == null)
            if (oViewModel.STDREF_LIST != null)
            {
                if (oViewModel.STDREF_LIST.Count <= 0)
                {
                    bIsvalid = false;
                }                                                            //End if (oViewModel.STDREF_LIST.Count > 0)
            } //End if (oViewModel.STDREF_LIST != null)

            //[STDREF_RUID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG1 = new ValidationMSG_VM();
                oMSG1.VAL_ERRID  = "STDREF_RUID1";
                oMSG1.VAL_ERRMSG = "Referensi/standard harus diisi";
                aValidationMSG.Add(oMSG1);

                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "STDREF_RUID0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_STDREF_RUID()
コード例 #5
0
ファイル: CPARPRIV_Validation.cs プロジェクト: arinsuga/actup
        }     //End private void Validate_CPAR_RESOLUTION3()

        private void Validate_CPAR_STS()
        {
            Boolean bIsvalid = true;

            //[CPAR_DESC] - Required
            if ((oViewModel_verify.CPAR_STEP == "") || (oViewModel_verify.CPAR_STEP == null) ||
                (oViewModel_verify.CPAR_STEP != valFLAG.FLAG_CPAR_STEP_VERIFIED))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "CPAR_STS1";
                oMSG.VAL_ERRMSG = "CPAR belum diverifikasi";
                aValidationMSG.Add(oMSG);
            } //End if

            //[CPAR_DESC] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "CPAR_STS0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_CPAR_RESOLUTION2()
コード例 #6
0
ファイル: CPARPRIV_Validation.cs プロジェクト: arinsuga/actup
        }     //End private void Validate_AUDITOR_RUID()

        private void Validate_AUDITEE_RUID()
        {
            Boolean bIsvalid = true;

            //[AUDITEE_RUID] - Required
            if ((oViewModel.AUDITEE_RUID == "") || (oViewModel.AUDITEE_RUID == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "AUDITEE_RUID1";
                oMSG.VAL_ERRMSG = "Auditee harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if
              //[AUDITEE_RUID] - Unique

            //[AUDITEE_RUID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "AUDITEE_RUID0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_AUDITEE_RUID()
コード例 #7
0
        private void Validate_ID()
        {
            Boolean bIsvalid = true;

            //[ID] - Required
            if (oViewModel.ID == null)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "ID1";
                oMSG.VAL_ERRMSG = "ID harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if
            ////[ID] - Unique
            //if (oDS.isExists_ID(oViewModel.ID))
            //{
            //    bIsvalid = false;
            //    ValidationMSG_VM oMSG = new ValidationMSG_VM();
            //    oMSG.VAL_ERRID = "ID2";
            //    oMSG.VAL_ERRMSG = "ID " + oViewModel.ID + " sudah digunakan";
            //    aValidationMSG.Add(oMSG);
            //} //End if

            //[ID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "ID0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_ID()
コード例 #8
0
        private void Validate_EVALUATION_DESC()
        {
            Boolean bIsvalid = true;

            //[EVALUATION_DESC] - Required
            if (oViewModel.EVALUATION_DESC == null)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "EVALUATION_DESC1";
                oMSG.VAL_ERRMSG = "EVALUATION_DESC harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if
            ////[EVALUATION_DESC] - Unique
            //if (oDS.isExists_EVALUATION_DESC(oViewModel.EVALUATION_DESC))
            //{
            //    bIsvalid = false;
            //    ValidationMSG_VM oMSG = new ValidationMSG_VM();
            //    oMSG.VAL_ERRID = "EVALUATION_DESC2";
            //    oMSG.VAL_ERRMSG = "ID " + oViewModel.EVALUATION_DESC + " sudah digunakan";
            //    aValidationMSG.Add(oMSG);
            //} //End if

            //[EVALUATION_DESC] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "EVALUATION_DESC0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_EVALUATION_DESC()
コード例 #9
0
        }     //End private void Validate_LOV_NM()

        private void Validate_DELETE()
        {
            Boolean bIsvalid = true;

            //[ISUSEDBY_RES] - Inuse
            if (oDS.isUSEDBY_RES(oViewModel.RUID))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "DELETE1";
                oMSG.VAL_ERRMSG = "Sudah digunakan oleh beberapa user";
                aValidationMSG.Add(oMSG);
            } //End if
            //[USEDBY_AUDIT] - Inuse
            if (oDS.isUSEDBY_AUDIT(oViewModel.RUID))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "DELETE2";
                oMSG.VAL_ERRMSG = "Sudah digunakan oleh beberapa proses audit";
                aValidationMSG.Add(oMSG);
            } //End if

            //[DELETE] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "DELETE0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_DELETE()
コード例 #10
0
        }     //End private void Validate_TITLE()

        private void Validate_FULL_DESC()
        {
            Boolean bIsvalid = true;

            //[FULL_DESC] - Required
            if ((oViewModel.FULL_DESC == "") || (oViewModel.FULL_DESC == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "FULL_DESC1";
                oMSG.VAL_ERRMSG = "Deskripsi tata tertib harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if
            //[FULL_DESC] - Minimum 10 character
            if ((oViewModel.FULL_DESC != "") && (oViewModel.FULL_DESC.Length < 10))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "FULL_DESC1";
                oMSG.VAL_ERRMSG = "Deskripsi tata tertib minimmal 10 karakter";
                aValidationMSG.Add(oMSG);
            } //End if

            //[FULL_DESC] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "FULL_DESC0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_FULL_DESC()
コード例 #11
0
ファイル: CPARPRIV_Validation.cs プロジェクト: arinsuga/actup
        }     //End private void Validate_CPAR_DT()

        private void Validate_AUDITOR_RUID()
        {
            Boolean bIsvalid = true;

            if (oViewModel.CPAR_TYPE != valFLAG.FLAG_CPAR_TYPE_CC)
            {
                //[AUDITOR_RUID] - Required
                if ((oViewModel.AUDITOR_RUID == "") || (oViewModel.AUDITOR_RUID == null))
                {
                    bIsvalid = false;
                    ValidationMSG_VM oMSG = new ValidationMSG_VM();
                    oMSG.VAL_ERRID  = "AUDITOR_RUID1";
                    oMSG.VAL_ERRMSG = "Auditor harus diisi";
                    aValidationMSG.Add(oMSG);
                } //End if
            }     //End if (oViewModel.CPAR_TYPE != valFLAG.FLAG_CPAR_TYPE_CC)

            //[AUDITOR_RUID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "AUDITOR_RUID0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_AUDITOR_RUID()
コード例 #12
0
ファイル: CPARPRIV_Validation.cs プロジェクト: arinsuga/actup
        }     //End private void Validate_VFKS4_DESC()

        private void Validate_VFKS5_DESC()
        {
            Boolean bIsvalid = true;

            //[VFKS1_DESC] - maxlength
            if ((oViewModel_verify.VFKS5_DESC != "") && (oViewModel_verify.VFKS5_DESC != null))
            {
                if (oViewModel_verify.VFKS5_DESC.Length > 100)
                {
                    bIsvalid = false;
                    ValidationMSG_VM oMSG = new ValidationMSG_VM();
                    oMSG.VAL_ERRID  = "VFKS5_DESC1";
                    oMSG.VAL_ERRMSG = "Komentar maximal 100 karakter";
                    aValidationMSG.Add(oMSG);
                } //End if (oViewModel_verify.VFKS1_DESC.Length > 100
            }     //End if

            //[VFKS5_DESC] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "VFKS5_DESC0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_VFKS5_DESC()
コード例 #13
0
        private void Validate_USERNAMENEW()
        {
            Boolean bIsvalid = true;

            //[Username] - Required
            if ((oViewModel.USERNAME == "") || (oViewModel.USERNAME == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "USERNAME1";
                oMSG.VAL_ERRMSG = "Username harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if

            //[USERNAME] - Unique
            if (oDS.isExists_Username(oViewModel.USERNAME))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "USERNAME2";
                oMSG.VAL_ERRMSG = "Username " + oViewModel.ID + " sudah digunakan";
                aValidationMSG.Add(oMSG);
            } //End if

            //[ID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "USERNAME0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_USERNAMENEW()
コード例 #14
0
        }     //End private void Validate_PROJ_NM()

        //TEMP: CLIENT_RUID untuk sementara diisi CLIENT NAME jadi validasi nya sementara juga mengikuti validasi NAME
        private void Validate_CLIENT_RUID()
        {
            Boolean bIsvalid = true;

            //[LOV_NM] - Maxlength
            if ((oViewModel.CLIENT_RUID != "") && (oViewModel.CLIENT_RUID != null))
            {
                if (oViewModel.CLIENT_RUID.Length > valFLAG.FLAG_MAXLENGTH_NM)
                {
                    bIsvalid = false;
                    ValidationMSG_VM oMSG = new ValidationMSG_VM();
                    oMSG.VAL_ERRID  = "CLIENT_RUID2";
                    oMSG.VAL_ERRMSG = "Maximal " + valFLAG.FLAG_MAXLENGTH_NM.ToString() + " character";
                    aValidationMSG.Add(oMSG);
                }
            } //End if

            //[LOV_NM] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "CLIENT_RUID0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_PROJ_NM()
コード例 #15
0
        private void Validate_USR_ID_CPAR()
        {
            Boolean bIsvalid = true;
            //[USR_ID] - User ID tidak boleh kosong
            if ((oViewModelCPAR.USR_ID == "") || (oViewModelCPAR.USR_ID == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID = "USR_ID1";
                oMSG.VAL_ERRMSG = "User ID tidak boleh kosong";
                aValidationMSG.Add(oMSG);
            } //End if
            //[USR_ID] - Check if user ID exists
            if (oDS.isExists_USR_ID(oViewModelCPAR.USR_ID))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID = "USR_ID2";
                oMSG.VAL_ERRMSG = "User ID sudah digunakan";
                aValidationMSG.Add(oMSG);
            } //End if

            //[USR_ID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID = "USR_ID0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        } //End private void Validate_USR_ID_CPAR()
コード例 #16
0
        }     //End private void Validate_CLASSROOM_ID()

        private void Validate_NIS()
        {
            Boolean bIsvalid = true;

            //[NIS] - Required
            if ((oViewModel.NIS == "") || (oViewModel.NIS == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "NIS1";
                oMSG.VAL_ERRMSG = "Nomor induk siswa harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if
            //[NIS] - Unique
            if (oDS.isExists_NIS(oViewModel.NIS))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "NIS2";
                oMSG.VAL_ERRMSG = "NIS " + oViewModel.NIS + " sudah digunakan";
                aValidationMSG.Add(oMSG);
            } //End if

            //[NIS] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "NIS0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_NIS()
コード例 #17
0
        private void Validate_ID()
        {
            Boolean bIsvalid = true;

            ////[ID] - Required
            //if (oViewModel.ID == null)
            //{
            //    bIsvalid = false;
            //    ValidationMSG_VM oMSG = new ValidationMSG_VM();
            //    oMSG.VAL_ERRID = "ID1";
            //    oMSG.VAL_ERRMSG = "ID harus diisi";
            //    aValidationMSG.Add(oMSG);
            //} //End if

            //[ID] - Unique
            if (oDS.getData_ID(oViewModel.EMPLOYEE_ID, oViewModel.STUDENT_ID, oViewModel.LH_DT) != null)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "ID1";
                oMSG.VAL_ERRMSG = "Laporan tanggal " + hlpConvertionAndFormating.ConvertDateToStringDateShortFmt(oViewModel.LH_DT) + " sudah pernah diinput";
                aValidationMSG.Add(oMSG);
            } //End if

            //[ID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "ID0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_ID()
コード例 #18
0
        }     //End private void Validate_PASSWORD()

        private void Validate_EMAIL()
        {
            Boolean bIsvalid = true;

            //[Password] - Required
            if ((oViewModel.EMAIL != "") && (oViewModel.EMAIL != null))
            {
                if (!hlpValidation.isValidEmail(oViewModel.EMAIL))
                {
                    bIsvalid = false;
                    ValidationMSG_VM oMSG = new ValidationMSG_VM();
                    oMSG.VAL_ERRID  = "EMAIL1";
                    oMSG.VAL_ERRMSG = "Format email tidak sesuai (contoh yang benar : [email protected])";
                    aValidationMSG.Add(oMSG);
                } //End if (!hlpValidation.isValidEmail(oViewModel.EMAIL))
            }     //End if
            //[ID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "EMAIL0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_PASSWORD()
コード例 #19
0
        }     //End private void Validate_PASSWORD()

        private void Validate_EMAIL()
        {
            Boolean bIsvalid = true;

            //[EMAIL] - Required
            if (oViewModel.EMAIL == null)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "EMAIL1";
                oMSG.VAL_ERRMSG = "Email harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if


            if ((oViewModel.EMAIL != "") && (oViewModel.EMAIL != null))
            {
                //[EMAIL] - Unique
                if (oDS.isExists_Email(oViewModel.EMAIL))
                {
                    bIsvalid = false;
                    ValidationMSG_VM oMSG = new ValidationMSG_VM();
                    oMSG.VAL_ERRID  = "EMAIL2";
                    oMSG.VAL_ERRMSG = "Email " + oViewModel.EMAIL + " sudah digunakan";
                    aValidationMSG.Add(oMSG);
                } //End if
                //[Email] - Format
                if (!hlpValidation.isValidEmail(oViewModel.EMAIL))
                {
                    bIsvalid = false;
                    ValidationMSG_VM oMSG = new ValidationMSG_VM();
                    oMSG.VAL_ERRID  = "EMAIL3";
                    oMSG.VAL_ERRMSG = "Format email tidak sesuai (contoh yang benar : [email protected])";
                    aValidationMSG.Add(oMSG);
                } //End if (!hlpValidation.isValidEmail(oViewModel.EMAIL))
            }     //End if
            //[ID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "EMAIL0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_PASSWORD()
コード例 #20
0
        }     //End private void Validate_RUID()

        private void Validate_PROJ_ID()
        {
            Boolean bIsvalid = true;

            //[PROJ_ID] - Required
            if ((oViewModel.PROJ_ID == "") || (oViewModel.PROJ_ID == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "PROJ_ID1";
                oMSG.VAL_ERRMSG = "Kode harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if
            //[PROJ_ID] - Unique
            if (oDS.isExists_PROJ_ID(oViewModel.PROJ_ID))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "PROJ_ID2";
                oMSG.VAL_ERRMSG = "Kode " + oViewModel.PROJ_ID + " sudah digunakan";
                aValidationMSG.Add(oMSG);
            } //End if
            //[LOV_ID] - Maxlength
            if ((oViewModel.PROJ_ID != "") && (oViewModel.PROJ_ID != null))
            {
                if (oViewModel.PROJ_ID.Length > valFLAG.FLAG_MAXLENGTH_ID)
                {
                    bIsvalid = false;
                    ValidationMSG_VM oMSG = new ValidationMSG_VM();
                    oMSG.VAL_ERRID  = "PROJ_ID3";
                    oMSG.VAL_ERRMSG = "Maximal " + valFLAG.FLAG_MAXLENGTH_ID.ToString() + " character";
                    aValidationMSG.Add(oMSG);
                }
            } //End if

            //[PROJ_ID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "PROJ_ID0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_PROJ_ID()
コード例 #21
0
        } //End private void Validate_DEPT_RUID_CPAR()

        private void Validate_USR_PSWD_CPAR() {
            Boolean bIsvalid = true;
            //[USR_PSWD] - Password tidak boleh kosong
            if ((oViewModelCPAR.USR_PSWD == "") || (oViewModelCPAR.USR_PSWD == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID = "USR_PSWD1";
                oMSG.VAL_ERRMSG = "Password tidak boleh kosong";
                aValidationMSG.Add(oMSG);
            } //End if

            //[USR_PSWD] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID = "USR_PSWD0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        } //End private void Validate_USR_PSWD_CPAR()
コード例 #22
0
        }     //End private void Validate_ID()

        private void Validate_isValidated(TaskdVM poViewModel)
        {
            Boolean bIsvalid = true;

            this.oViewModel_detail = null;
            this.oViewModel_detail = poViewModel;
            //[IS_VALIDATED] - Is Validated task
            if ((this.oViewModel_detail.TASKD_PROGRESSPCT != null &&
                 this.oViewModel_detail.TASKD_PROGRESSPCT == 100) &&
                (this.oViewModel_detail.TASKD_VALIDATESTS != null &&
                 this.oViewModel_detail.TASKD_VALIDATESTS > 0))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "IS_VALIDATED1";
                oMSG.VAL_ERRMSG = "Tugas " + this.oViewModel_detail.TASKD_PLANDESC + " sudah divalidasi. Tidak bisa di edit/delete.";
                aValidationMSG.Add(oMSG);
            } //End if
            ////[ID] - Unique
            //if (oDS.isExists_ID(oViewModel.ID))
            //{
            //    bIsvalid = false;
            //    ValidationMSG_VM oMSG = new ValidationMSG_VM();
            //    oMSG.VAL_ERRID = "ID2";
            //    oMSG.VAL_ERRMSG = "ID " + oViewModel.ID + " sudah digunakan";
            //    aValidationMSG.Add(oMSG);
            //} //End if

            //[ID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "IS_VALIDATED0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_ID()
コード例 #23
0
        }     //End private void Validate_PASSWORD()

        private void Validate_RES_ID()
        {
            Boolean bIsvalid = true;

            //[Password] - Required
            if (oViewModel.RES_ID == null)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "RES_ID1";
                oMSG.VAL_ERRMSG = "Siswa harus dipilih";
                aValidationMSG.Add(oMSG);
            } //End if
            //[ID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "RES_ID0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_RES_ID()
コード例 #24
0
        }     //End private void Validate_USERNAMEEDIT()

        private void Validate_PASSWORD()
        {
            Boolean bIsvalid = true;

            //[Password] - Required
            if ((oViewModel.PASSWORD == "") || (oViewModel.PASSWORD == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "PASSWORD1";
                oMSG.VAL_ERRMSG = "Password harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if
            //[ID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "PASSWORD0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_PASSWORD()
コード例 #25
0
        } //End private void Validate_USR_ID_CPAR2()
        private void Validate_USR_NM1_CPAR()
        {
            Boolean bIsvalid = true;
            //[USR_NM1] - Required
            if ((oViewModelCPAR.USR_NM1 == "") || (oViewModelCPAR.USR_NM1 == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID = "USR_NM11";
                oMSG.VAL_ERRMSG = "User name tidak boleh kosong";
                aValidationMSG.Add(oMSG);
            } //End if

            //[USR_NM1] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID = "USR_NM10";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        } //End private void Validate_USR_NM1_CPAR()
コード例 #26
0
        } //End private void Validate_USR_NM1_CPAR()
        private void Validate_DEPT_RUID_CPAR()
        {
            Boolean bIsvalid = true;
            //[DEPT_RUID1] - Required
            if ((oViewModelCPAR.DEPT_RUID == "") || (oViewModelCPAR.DEPT_RUID == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID = "DEPT_RUID1";
                oMSG.VAL_ERRMSG = "Departemen tidak boleh kosong";
                aValidationMSG.Add(oMSG);
            } //End if

            //[DEPT_RUID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID = "DEPT_RUID0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        } //End private void Validate_DEPT_RUID_CPAR()
コード例 #27
0
ファイル: CPARPRIV_Validation.cs プロジェクト: arinsuga/actup
        }     //End private void Validate_AUDITEE_RUID()

        private void Validate_AUDIT_RUID()
        {
            Boolean bIsvalid = true;

            if (oViewModel.CPAR_TYPE != valFLAG.FLAG_CPAR_TYPE_CC)
            {
                //[AUDIT_RUID] - Required
                if ((oViewModel.AUDIT_RUID == "") || (oViewModel.AUDIT_RUID == null))
                {
                    bIsvalid = false;
                    ValidationMSG_VM oMSG = new ValidationMSG_VM();
                    oMSG.VAL_ERRID  = "AUDIT_RUID1";
                    oMSG.VAL_ERRMSG = "Proses audit harus diisi";
                    aValidationMSG.Add(oMSG);
                } //End if
            }     //End if (oViewModel.CPAR_TYPE == valFLAG.FLAG_CPAR_TYPE_CC)

            ////[AUDIT_RUID] - Unique
            //if (oDS.isExists_AUDIT_RUID(oViewModel.AUDIT_RUID))
            //{
            //    bIsvalid = false;
            //    ValidationMSG_VM oMSG = new ValidationMSG_VM();
            //    oMSG.VAL_ERRID = "AUDIT_RUID2";
            //    oMSG.VAL_ERRMSG = "AUDIT_RUID " + oViewModel.AUDIT_RUID + " sudah digunakan";
            //    aValidationMSG.Add(oMSG);
            //} //End if

            //[AUDIT_RUID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "AUDIT_RUID0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_AUDIT_RUID()
コード例 #28
0
        }     //End private void Validate_CPAR_DT1()

        private void Validate_CPAR_DT2()
        {
            Boolean bIsvalid = true;

            //[CPAR_DT2] - Required
            if ((oViewModel.CPAR_DT1 != null) && (oViewModel.CPAR_DT2 == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "CPAR_DT21";
                oMSG.VAL_ERRMSG = "Tanggal tidak boleh kosong";
                aValidationMSG.Add(oMSG);
            } //End if

            //[CPAR_DT2] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "CPAR_DT20";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_CPAR_DT2()
コード例 #29
0
        }     //End private void Validate_PROJ_ID()

        private void Validate_PROJ_NM()
        {
            Boolean bIsvalid = true;

            //[LOV_NM] - Required
            if ((oViewModel.PROJ_NM == "") || (oViewModel.PROJ_NM == null))
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "PROJ_NM1";
                oMSG.VAL_ERRMSG = "Nama Project harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if
            //[LOV_NM] - Maxlength
            if ((oViewModel.PROJ_NM != "") && (oViewModel.PROJ_NM != null))
            {
                if (oViewModel.PROJ_NM.Length > valFLAG.FLAG_MAXLENGTH_NM)
                {
                    bIsvalid = false;
                    ValidationMSG_VM oMSG = new ValidationMSG_VM();
                    oMSG.VAL_ERRID  = "PROJ_NM2";
                    oMSG.VAL_ERRMSG = "Maximal " + valFLAG.FLAG_MAXLENGTH_NM.ToString() + " character";
                    aValidationMSG.Add(oMSG);
                }
            } //End if

            //[LOV_NM] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "PROJ_NM0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_PROJ_NM()
コード例 #30
0
ファイル: SkhPRIV_Validation.cs プロジェクト: arinsuga/kindup
        }     //End private void Validate_FILTER_YEAR_ID()

        private void Validate_FILTER_SEMESTER_ID()
        {
            Boolean bIsvalid = true;

            //[FILTER_SEMESTER_ID] - Required
            if (oViewModelfilter.FILTER_SEMESTER_ID == null)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "FILTER_SEMESTER_ID1";
                oMSG.VAL_ERRMSG = "Semester harus diisi";
                aValidationMSG.Add(oMSG);
            } //End if

            //[FILTER_SEMESTER_ID] - If has error(s)
            if (!bIsvalid)
            {
                bIsvalid = false;
                ValidationMSG_VM oMSG = new ValidationMSG_VM();
                oMSG.VAL_ERRID  = "FILTER_SEMESTER_ID0";
                oMSG.VAL_ERRMSG = "ERROR";
                aValidationMSG.Add(oMSG);
            } //End if
        }     //End private void Validate_FILTER_SEMESTER_ID()