Beispiel #1
0
 public void UpdateAsASOIProgrammesRecord(string list_id, ASOIResultModel model, string user_id)
 {
     AsASOIProgrammesRepository.UpdateAsASOIProgrammesRecord(list_id, model.Analytical, model.Section, model.Program_code,
                                                             model.No_project, model.Prog_sub_cat, model.Prog_desc, model.Prog_organizer, model.Service_provided, model.Start_date, model.End_date,
                                                             model.Contract_signed, model.Nature_income, model.Roll_over, model.Ytd_income.ToString(), model.Ytd_pe.ToString(), model.Ytd_oc.ToString(), model.Cyp_income.ToString(),
                                                             model.Cyp_pe.ToString(), model.Cyp_oc.ToString(), model.Poa_income.ToString(), model.Poa_pe.ToString(), model.Poa_oc.ToString(), model.Remarks, user_id);
 }
Beispiel #2
0
        public ASOIResultModel GetModelDetail(ASOIResultModel model, string rp_id)
        {
            var ds = AsASOIProgrammesRepository.GetASOIResultById(rp_id);

            if (ds != null && ds.Tables.Count != 0 && ds.Tables[0].Rows.Count != 0)
            {
                model.Cat        = ds.Tables[0].Rows[0]["cat"].ToString();
                model.Hosp_code  = ds.Tables[0].Rows[0]["hosp"].ToString();
                model.Analytical = ds.Tables[0].Rows[0]["analytical"].ToString();
                model.Section    = ds.Tables[0].Rows[0]["section"].ToString();
            }
            model.Cat_name = AsCatInfoRepository.GetCatName(model.Cat);
            model.Period   = GetPeriod();
            return(model);
        }
Beispiel #3
0
        public List <ASOIResultModel> GetASOIResultList(ASOISearchModel model)
        {
            List <ASOIResultModel> result = new List <ASOIResultModel>();
            var ds = AsASOIProgrammesRepository.GetASOIResultList(model.Hosp_code, model.Get_max_period, model.Sch_allcat, model.Cat_no, model.Sch_start_date_begin,
                                                                  model.Sch_start_date_until, model.Sch_analytical_start, model.Sch_analytical_end,
                                                                  model.Sch_section, model.Sch_program_code, model.Sch_prog_subcat, model.Sch_description_location,
                                                                  model.Sch_organizer_department, model.Sch_nature_income, model.Sch_service_provided);

            if (ds != null && ds.Tables.Count != 0 && ds.Tables[0].Rows.Count != 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    ASOIResultModel asoi = new ASOIResultModel();
                    asoi.Id               = dr["id"].ToString();
                    asoi.Cat              = dr["cat"].ToString();
                    asoi.Analytical       = dr["analytical"].ToString();
                    asoi.Section          = dr["section"].ToString();
                    asoi.Program_code     = dr["program_code"].ToString();
                    asoi.Prog_sub_cat     = dr["prog_sub_cat"].ToString();
                    asoi.Prog_desc        = dr["prog_desc"].ToString();
                    asoi.Nature_income    = dr["nature_income"].ToString();
                    asoi.Prog_organizer   = dr["prog_organizer"].ToString();
                    asoi.Service_provided = dr["service_provided"].ToString();
                    asoi.Start_date       = DateTime.Parse(dr["start_date"].ToString()).ToString("dd/MM/yyyy");
                    asoi.No_project       = model.Cat_no != "10" ? dr["no_project"].ToString() : "";
                    if (model.Sch_allcat == "all" || model.Subcat_check != "none")
                    {
                        asoi.Prog_sub_cat = AsProgSubcatRepository.GetSubCatByValue(dr["prog_sub_cat"].ToString());
                    }
                    asoi.Nature_income    = AsNatureIncomeRepository.GetNatureIncomeById(dr["nature_income"].ToString());
                    asoi.Service_provided = AsServiceProvidedRepository.GetServiceProvidedById(dr["service_provided"].ToString());
                    if (asoi.Start_date.ToString() == "01/01/1900")
                    {
                        asoi.Start_date = "";
                    }
                    result.Add(asoi);
                }
            }

            return(result);
        }