Example #1
0
        }     //End public List<Student_ListVM> getDatalist()

        public List <StudentdetailVM> getDatalist_lookup2(StudentVM poViewModel = null)
        {
            List <StudentdetailVM> vReturn;


            using (var db = new DBMAINContext())
            {
                var oQRY = from tb in db.Student_infos
                           select new StudentdetailVM
                {
                    BRANCH_ID           = tb.BRANCH_ID,
                    YEAR_ID             = tb.YEAR_ID,
                    SEMESTER_ID         = tb.SEMESTER_ID,
                    CLASSTYPE_ID        = tb.CLASSTYPE_ID,
                    CLASSTYPE_CODE      = tb.CLASSTYPE_CODE,
                    CLASSTYPE_SHORTDESC = tb.CLASSTYPE_SHORTDESC,

                    CLASSLEVEL_ID        = tb.CLASSLEVEL_ID,
                    CLASSLEVEL_CODE      = tb.CLASSLEVEL_CODE,
                    CLASSLEVEL_SHORTDESC = tb.CLASSLEVEL_SHORTDESC,

                    CLASSROOM_ID        = tb.CLASSROOM_ID,
                    CLASSROOM_CODE      = tb.CLASSROOM_CODE,
                    CLASSROOM_SHORTDESC = tb.CLASSROOM_SHORTDESC,

                    ID          = tb.ID,
                    NAME        = tb.NAME,
                    NIS         = tb.NIS,
                    STUDENT_IMG = tb.STUDENT_IMG,
                    IS_PINDAHAN = tb.IS_PINDAHAN,
                    SPP_AMOUNT  = tb.SPP_AMOUNT
                };
                if (poViewModel != null)
                {
                    if (poViewModel.FILTER_BRANCH_ID != null)
                    {
                        oQRY = oQRY.Where(fld => fld.BRANCH_ID == poViewModel.FILTER_BRANCH_ID);
                    } //End if (poViewModel.YEAR_ID != null)
                    if (poViewModel.FILTER_YEAR_ID != null)
                    {
                        oQRY = oQRY.Where(fld => fld.YEAR_ID == poViewModel.FILTER_YEAR_ID);
                    } //End if (poViewModel.YEAR_ID != null)
                    if (poViewModel.FILTER_SEMESTER_ID != null)
                    {
                        oQRY = oQRY.Where(fld => fld.SEMESTER_ID == poViewModel.FILTER_SEMESTER_ID);
                    } //End if (poViewModel.SEMESTER_ID != null)
                    if (poViewModel.FILTER_CLASSTYPE_ID != null)
                    {
                        oQRY = oQRY.Where(fld => fld.CLASSTYPE_ID == poViewModel.FILTER_CLASSTYPE_ID);
                    } //End if (poViewModel.CLASSTYPE_ID != null)
                    if (poViewModel.FILTER_CLASSTYPE_ID != null)
                    {
                        oQRY = oQRY.Where(fld => fld.CLASSTYPE_ID == poViewModel.FILTER_CLASSTYPE_ID);
                    } //End if (poViewModel.CLASSTYPE_ID != null)
                    if (poViewModel.FILTER_CLASSLEVEL_ID != null)
                    {
                        oQRY = oQRY.Where(fld => fld.CLASSLEVEL_ID == poViewModel.FILTER_CLASSLEVEL_ID);
                    } //End if (poViewModel.CLASSTYPE_ID != null)
                    if (poViewModel.FILTER_CLASSROOM_ID != null)
                    {
                        oQRY = oQRY.Where(fld => fld.CLASSROOM_ID == poViewModel.FILTER_CLASSROOM_ID);
                    } //End if (poViewModel.FILTER_CLASSROOM_ID != null)
                }     //End if (poViewModel != null)
                vReturn = oQRY.ToList();
            }         //End using (var = new DbContext())
            return(vReturn);
        }             //End public List<Student_ListVM> getDatalist()
Example #2
0
        }     //End public Transaction_inddetailVM getData(int? id = null)

        public List <Transaction_inddetailVM> getDatalist_byFilter(StudentVM poViewModel = null)
        {
            List <Transaction_inddetailVM> vReturn;
            var oQRY = from tb in this.db.Transaction_ind_infos
                       select new Transaction_inddetailVM
            {
                ID                        = tb.ID,
                DTA_STS                   = tb.DTA_STS,
                TRND_METHODID             = tb.TRND_METHODID,
                TRND_TYPEID               = tb.TRND_TYPEID,
                TRND_SUBTYPEID            = tb.TRND_SUBTYPEID,
                TRND_ITEMTYPEID           = tb.TRND_ITEMTYPEID,
                TRND_ITEMID               = tb.TRND_ITEMID,
                TRND_QTY                  = tb.TRND_QTY,
                TRND_PRICE                = tb.TRND_PRICE,
                TRND_AMOUNT               = tb.TRND_AMOUNT,
                TRND_PRICEBASE            = tb.TRND_PRICEBASE,
                TRND_QTYBASE              = tb.TRND_QTYBASE,
                TRND_AMOUNTBASE           = tb.TRND_AMOUNTBASE,
                TRND_DESC                 = tb.TRND_DESC,
                TRN_ID                    = tb.TRN_ID,
                INST_ID                   = tb.INST_ID,
                INSTD_ID                  = tb.INSTD_ID,
                INSTD_SEQNO               = tb.INSTD_SEQNO,
                TRINMETHOD_CODE           = tb.TRINMETHOD_CODE,
                TRINMETHOD_SHORTDESC      = tb.TRINMETHOD_SHORTDESC,
                TRINMETHOD_DESC           = tb.TRINMETHOD_DESC,
                TRINTYPE_CODE             = tb.TRINTYPE_CODE,
                TRINTYPE_SHORTDESC        = tb.TRINTYPE_SHORTDESC,
                TRINTYPE_DESC             = tb.TRINTYPE_DESC,
                TRINSUBTYPE_CODE          = tb.TRINSUBTYPE_CODE,
                TRINSUBTYPE_SHORTDESC     = tb.TRINSUBTYPE_SHORTDESC,
                TRINSUBTYPE_DESC          = tb.TRINSUBTYPE_DESC,
                ITEMTYPE_CODE             = tb.ITEMTYPE_CODE,
                ITEMTYPE_SHORTDESC        = tb.ITEMTYPE_SHORTDESC,
                ITEMTYPE_DESC             = tb.ITEMTYPE_DESC,
                ITEM_CODE                 = tb.ITEM_CODE,
                ITEM_SHORTDESC            = tb.ITEM_SHORTDESC,
                ITEM_DESC                 = tb.ITEM_DESC,
                BRANCH_ID                 = tb.BRANCH_ID,
                YEAR_ID                   = tb.YEAR_ID,
                SEMESTER_ID               = tb.SEMESTER_ID,
                CLASSTYPE_ID              = tb.CLASSTYPE_ID,
                CLASSLEVEL_ID             = tb.CLASSLEVEL_ID,
                CLASSROOM_ID              = tb.CLASSROOM_ID,
                CLASSMAJOR_ID             = tb.CLASSMAJOR_ID,
                TRN_DT                    = tb.TRN_DT,
                TRN_STS                   = tb.TRN_STS,
                TRN_AMOUNT                = tb.TRN_AMOUNT,
                TRN_TERBILANG             = tb.TRN_TERBILANG,
                TRN_DESC                  = tb.TRN_DESC,
                STUDENT_ID                = tb.STUDENT_ID,
                RECEIPT_NO                = tb.RECEIPT_NO,
                RECEIPT_PRINTDT           = tb.RECEIPT_PRINTDT,
                RECEIPT_PAIDBY            = tb.RECEIPT_PAIDBY,
                RECEIPT_RECEIVEDBY        = tb.RECEIPT_RECEIVEDBY,
                CACHE_YEAR_CODE           = tb.CACHE_YEAR_CODE,
                CACHE_YEAR_SHORTDESC      = tb.CACHE_YEAR_SHORTDESC,
                CACHE_YEAR_DESC           = tb.CACHE_YEAR_DESC,
                CACHE_YEAR_FROM           = tb.CACHE_YEAR_FROM,
                CACHE_YEAR_TO             = tb.CACHE_YEAR_TO,
                BRANCH_TYPE               = tb.BRANCH_TYPE,
                BRANCH_DESC               = tb.BRANCH_DESC,
                YEAR_DESC                 = tb.YEAR_DESC,
                YEAR_FROM                 = tb.YEAR_FROM,
                YEAR_TO                   = tb.YEAR_TO,
                SEMESTER_DESC             = tb.SEMESTER_DESC,
                SEMESTER_NUM              = tb.SEMESTER_NUM,
                CLASSTYPE_DESC            = tb.CLASSTYPE_DESC,
                CLASSROOM_DESC            = tb.CLASSROOM_DESC,
                STUDENT_NAME              = tb.STUDENT_NAME,
                STUDENT_NICKNAME          = tb.STUDENT_NICKNAME,
                STUDENT_NIS               = tb.STUDENT_NIS,
                STUDENT_NISN              = tb.STUDENT_NISN,
                STUDENT_CLASSTYPE_ID      = tb.STUDENT_CLASSTYPE_ID,
                STUDENT_CLASSROOM_ID      = tb.STUDENT_CLASSROOM_ID,
                INST_DT                   = tb.INST_DT,
                INST_STS                  = tb.INST_STS,
                INST_STARTDT              = tb.INST_STARTDT,
                INST_ENDDT                = tb.INST_ENDDT,
                INST_TYPEID               = tb.INST_TYPEID,
                INST_SUBTYPEID            = tb.INST_SUBTYPEID,
                INST_QTYBASE              = tb.INST_QTYBASE,
                INST_PRICEBASE            = tb.INST_PRICEBASE,
                INST_AMOUNTBASE           = tb.INST_AMOUNTBASE,
                INST_QTY                  = tb.INST_QTY,
                INST_AMOUNT               = tb.INST_AMOUNT,
                INST_DESC                 = tb.INST_DESC,
                INST_CACHE_YEAR_CODE      = tb.INST_CACHE_YEAR_CODE,
                INST_CACHE_YEAR_SHORTDESC = tb.INST_CACHE_YEAR_SHORTDESC,
                INST_CACHE_YEAR_DESC      = tb.INST_CACHE_YEAR_DESC,
                INST_CACHE_YEAR_FROM      = tb.INST_CACHE_YEAR_FROM,
                INST_CACHE_YEAR_TO        = tb.INST_CACHE_YEAR_TO
            };

            if (poViewModel != null)
            {
                if (poViewModel.FILTER_BRANCH_ID != null)
                {
                    oQRY = oQRY.Where(fld => fld.BRANCH_ID == poViewModel.FILTER_BRANCH_ID);
                } //End if (poViewModel.YEAR_ID != null)
                if (poViewModel.FILTER_YEAR_ID != null)
                {
                    oQRY = oQRY.Where(fld => fld.YEAR_ID == poViewModel.FILTER_YEAR_ID);
                } //End if (poViewModel.YEAR_ID != null)
                if (poViewModel.FILTER_SEMESTER_ID != null)
                {
                    oQRY = oQRY.Where(fld => fld.SEMESTER_ID == poViewModel.FILTER_SEMESTER_ID);
                } //End if (poViewModel.SEMESTER_ID != null)
                if (poViewModel.FILTER_CLASSTYPE_ID != null)
                {
                    oQRY = oQRY.Where(fld => fld.CLASSTYPE_ID == poViewModel.FILTER_CLASSTYPE_ID);
                } //End if (poViewModel.CLASSTYPE_ID != null)
                if (poViewModel.FILTER_CLASSTYPE_ID != null)
                {
                    oQRY = oQRY.Where(fld => fld.CLASSTYPE_ID == poViewModel.FILTER_CLASSTYPE_ID);
                } //End if (poViewModel.CLASSTYPE_ID != null)
            }     //End if (poViewModel != null)
            vReturn = oQRY.ToList();
            return(vReturn);
        } //End public List<Transaction_indlistVM> getDatalist()
Example #3
0
        } //End public Student_Validation()

        //Constructor 2
        public Student_Validation(StudentVM poViewModel)
        {
            oViewModelfilter = poViewModel;
        } //End public Student_Validation()