Ejemplo n.º 1
0
        } //End public void setMONTHS_TUNGGAKAN()

        public void setSYSINFO_TUNGGAKAN()
        {
            SysinfoDS oDS = new SysinfoDS();

            //Set Sysinfo
            this.SYSINFO = oDS.getSYSDATEVM();
        } //End public void setMONTHS_TUNGGAKAN()
Ejemplo n.º 2
0
        public Byte?getData_currentSemesterID()
        {
            SysinfoDS oDSSysinfo = new SysinfoDS();

            //Semester 1 / Semeseter 2
            return(getData_SemesterID(oDSSysinfo.getData().SYSDATE));
        } //End public int? getData_currentSemesterID()
Ejemplo n.º 3
0
        }                                                                                    //End public void Delete

        public void Create()
        {
            SysinfodetailVM oViewModel = new SysinfoDS().getData();

            try
            {
                using (var db = new DBMAINContext())
                {
                    int nYEAR      = oViewModel.SYSDATE.Value.Year;
                    int nMONTH     = oViewModel.SYSDATE.Value.Month;
                    int nYEAR_FROM = 0;
                    int nYEAR_TO   = 0;
                    //1 Juli - 31 Desember (Semester 1)
                    if ((nMONTH >= 7) && (nMONTH <= 12))
                    {
                        nYEAR_FROM = nYEAR;
                        nYEAR_TO   = nYEAR + 1;
                    } //End if ((nMONTH >= 7) && (nMONTH <= 12))
                    //1 Januari - 30 Juni (Semester 2)
                    if ((nMONTH >= 1) && (nMONTH <= 6))
                    {
                        nYEAR_FROM = nYEAR - 1;
                        nYEAR_TO   = nYEAR;
                    } //End if ((nMONTH >= 1) && (nMONTH <= 6))
                    string   sYEAR_CODE = nYEAR_FROM.ToString() + " - " + nYEAR_TO.ToString();
                    DateTime?oDatefrom  = hlpConvertionAndFormating.ConvertStringToDateShort("01/07/" + nYEAR_FROM.ToString());
                    DateTime?oDateto    = hlpConvertionAndFormating.ConvertStringToDateShort("30/06/" + nYEAR_TO.ToString());


                    /*----------------------------------------------------------------------*/
                    YearDS       oDS   = new YearDS();
                    YeardetailVM oData = oDS.getData_byPeriod(oDatefrom, oDateto);
                    if (oData == null)
                    {
                        Year oModel = new Year();
                        //Set Field Header
                        oModel.setFIELD_HEADER(hlpFlags_CRUDOption.CREATE);
                        //Set DTA_STS
                        oModel.DTA_STS        = valFLAG.FLAG_DTA_STS_CREATE;
                        oModel.YEAR_CODE      = sYEAR_CODE;
                        oModel.YEAR_SHORTDESC = sYEAR_CODE;
                        oModel.YEAR_DESC      = sYEAR_CODE;
                        oModel.YEAR_FROM      = oDatefrom;
                        oModel.YEAR_TO        = oDateto;

                        //Process CRUD
                        db.Years.Add(oModel);
                        db.SaveChanges();
                        this.ID = oModel.ID;
                    }                                                                          //End if (oData != null)
                }                                                                              //End using
            }                                                                                  //End try
            catch (Exception e) { isERR = true; this.ERRMSG = "CRUD - Create: " + e.Message; } //End catch
        }                                                                                      //End public void Create
Ejemplo n.º 4
0
        } //End public Task_workerCRUD()

        //Constructor 3
        public Task_workerCRUD(DBMAINContext poDB, TaskCRUD poCRUD, TaskdCRUD poCRUD_detail, TaskdDS poDSDetail,
                               SysinfoDS poDSSysinfo, EmployeeDS poDSEmployee)
        {
            this.db = poDB;
            //CRUD
            this.oCRUD        = poCRUD;
            this.oCRUD_detail = poCRUD_detail;
            //DS
            this.oDSDetail   = poDSDetail;
            this.oDSEmployee = poDSEmployee;
            this.oDSSysinfo  = poDSSysinfo;
        } //End public Task_workerCRUD()
Ejemplo n.º 5
0
 //Instantiate
 private void Instantiate()
 {
     //CRUD
     this.oCRUD        = new TaskCRUD(this.db);
     this.oCRUD_detail = new TaskdCRUD(this.db);
     //DS
     this.oDSDetail   = new TaskdDS(this.db);
     this.oDSSysinfo  = new SysinfoDS(this.db);
     this.oDSEmployee = new EmployeeDS(this.db);
     this.oDSMonth    = new MonthDS(this.db);
     this.oDSYear     = new YearDS(this.db);
     //DATA
     this.oData = new TaskVM();
 } //End private void Instantiate()
Ejemplo n.º 6
0
        } //End public int? getData_YearID(DateTime? pdDatetime = null)

        public YeardetailVM getData_currentYear()
        {
            SysinfoDS oDSSysinfo = new SysinfoDS();

            return(this.getData(oDSSysinfo.getSYSDATE()));
        } //End public int? getData_currentYearID()
Ejemplo n.º 7
0
        }     //End public YeardetailVM getData(int? id = null)

        public int?getData_currentYearID()
        {
            SysinfoDS oDSSysinfo = new SysinfoDS();

            return(getData_YearID(oDSSysinfo.getSYSDATE()));
        } //End public int? getData_currentYearID()