private void rest(object sender, RoutedEventArgs e) { cs.Visibility = Visibility.Collapsed; cc.Visibility = Visibility.Collapsed; pp.Visibility = Visibility.Collapsed; sec.Visibility = Visibility.Collapsed; delegation.Visibility = Visibility.Collapsed; EmpRest es = new EmpRest(); //es.GetRests(emp.PersonId); ss.RS.ItemsSource = es.GetRests(emp.PersonId); // DateTime date1 = (emp.BeginningDate).Value; //string count = es.MinRest(int.Parse(es.service_count(emp.BeginningDate.Value))).ToString(); int service = es.service_count(emp.BeginningDate.Value); int count = es.AllRest(service); //ss.all.Text = count.ToString(); int minrest = es.MinRest(count, emp.PersonId); //ss.tb.Text = minrest.ToString(); string lab = " المتبقي من الاجازات الإدارية للعام الحالي" + " " + minrest.ToString() + " من أصل" + " " + count.ToString(); ss.tb.Text = lab; ss.Visibility = Visibility.Visible; }
private void count_services(object sender, RoutedEventArgs e) { ss.Visibility = Visibility.Collapsed; cc.Visibility = Visibility.Collapsed; pp.Visibility = Visibility.Collapsed; delegation.Visibility = Visibility.Collapsed; sec.Visibility = Visibility.Collapsed; EmpRest es = new EmpRest(); DateTime date1 = (emp.BeginningDate).Value; int service = es.service_count(emp.BeginningDate.Value); cs.count.Text = " عدد سنوات الخدمة للموظف هي : " + service.ToString() + ""; cs.begin.Text = "تاريخ المباشرة : " + date1.ToShortDateString() + " سنة "; cs.Visibility = Visibility.Visible; }
private void count_services(object sender, RoutedEventArgs e) { ss.Visibility = Visibility.Collapsed; cc.Visibility = Visibility.Collapsed; pp.Visibility = Visibility.Collapsed; EmpRest es = new EmpRest(); DateTime date1 = (emp.BeginningDate).Value; int all_service = es.service_count(emp.BeginningDate.Value); int serviceday = (all_service * 360) - (es.calculate(emp.PersonId)); int service = serviceday / 360; int reminder = serviceday % 360; cs.count.Text = " عدد سنوات الخدمة للموظف هي : " + service.ToString() + " سنة " + " و " + reminder + " " + "يوم"; cs.begin.Text = "تاريخ المباشرة : " + date1.ToShortDateString() + ""; cs.Visibility = Visibility.Visible; }