Exemplo n.º 1
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            hidden.Style["visibility"] = "visible";
            ServiceList  services  = InOutUtils.ReadServices(Server.MapPath(data1));
            ResidentList residents = InOutUtils.ReadResidents(Server.MapPath(data2));

            Label5.Text = "Pašalintas sąrašas";
            string       month            = TextBox1.Text;
            string       serviceid        = TextBox2.Text;
            ResidentList residentsaverage = TaskUtils.PaidLessThanAvg(residents, services);
            ResidentList notpaidservices  = TaskUtils.DidntPay(residentsaverage, services, month, serviceid);

            InOutUtils.TableForLessAvg(Table3);
            ResidentList removedlist = TaskUtils.ResidentRemoval(residentsaverage, notpaidservices);

            InOutUtils.TableInsertLessAvg(Table3, removedlist);
        }
Exemplo n.º 2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            hidden.Style["visibility"] = "visible";
            ServiceList  services  = InOutUtils.ReadServices(Server.MapPath(data1));
            ResidentList residents = InOutUtils.ReadResidents(Server.MapPath(data2));

            Resident cheapestmonth = TaskUtils.LeastPaid(residents, services);
            double   amount        = Calcs.TotalAmountPaid(residents, services);

            Label2.Text = "Pigiausias mėnesis - " + cheapestmonth.Month;
            Label4.Text = "Pigiausi mokesčiai buvo - " + cheapestmonth.Service;
            Label3.Text = "Visų gyventojų išleisti pinigai - " + amount.ToString();
            Label1.Text = "Gyventojai, kurie sumokėjo mažesnę sumą mokesčių už vidurkį";

            ResidentList residentsaverage = TaskUtils.PaidLessThanAvg(residents, services);

            InOutUtils.TableForLessAvg(Table3);
            InOutUtils.TableInsertLessAvg(Table3, residentsaverage);
        }