Esempio n. 1
0
        private void RegisterEmployee()
        {
            const string quote = "\"";
            string       xml   = @"<RequestRegister xmlns=" + quote + "TimesheetService" + quote + ">" +
                                 "<Email>" + _txtBxEmail.Text.ToString() + "</Email>" +
                                 "<FirstName>" + _txtBxFirstName.Text.ToString() + "</FirstName>" +
                                 "<LastName>" + _txtBxLastName.Text.ToString() + "</LastName>" +
                                 "</RequestRegister>";

            SubmitPOST post = new SubmitPOST(xml, _urlRegister);

            employeeToken = post.Response[0];
            relogin       = Convert.ToBoolean(post.Response[1]);
        }
Esempio n. 2
0
        private void _btnSubmitTimesheet_Click(object sender, EventArgs e)
        {
            string NewTimesheetID;

            List <Timesheet.Timesheet> tsList = new List <Timesheet.Timesheet>();

            Timesheet.Timesheet ts = new Timesheet.Timesheet();
            ts = _dtNewTimesheet_Formatted.ToTimesheet();

            string xml = SerializeTimesheet(ts);

            SubmitPOST post = new SubmitPOST(xml, _urlAddTimesheet);

            NewTimesheetID = post.Response[0];
            if (NewTimesheetID != null)
            {
                _listviewTimesheets.Items.Clear();
                InitiateConsole(true);
                LoadTimesheets();
                MenuStrip_LoadTimesheetMenuItems();
            }
        }