예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var users = AppClients.GetUsers();

            dgUsers.DataSource = users;
            dgUsers.DataBind();
        }
예제 #2
0
 protected void btnOK_Click(object sender, EventArgs e)
 {
     if (FileUpload.HasFile)
     {
         AppClients.UploadDocument(sInn, FileUpload.FileName, FileUpload.FileBytes);
         Response.Redirect("MainForm.aspx");
     }
 }
예제 #3
0
        protected void btnDownload_Click(object sender, EventArgs e)
        {
            string name = string.Empty;

            byte[] data = AppClients.DownloadDocument(sInn, out name);
            if (data != null)
            {
                Response.ContentType = "application / force-download";
                Response.AppendHeader("Content-Disposition", "attachment; filename = " + name);
                Response.BinaryWrite(data);
                Response.End();
            }
            else
            {
                string script = "alert(\"Документ не знайдено!\")";
                ScriptManager.RegisterStartupScript(this, GetType(), "ServerControlScript", script, true);
            }
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            sInn = Request.QueryString["sInn"];
            AppGetUsers.AppUser usr = AppClients.GetUsers().FirstOrDefault(f => f.Inn == sInn);
            if (usr != null)
            {
                lblInn.Text          = usr.Inn;
                lblSurname.Text      = usr.Surname;
                lblFirstname.Text    = usr.Firstname;
                lblPatronymic.Text   = usr.Patronymic;
                lblPassport_ser.Text = usr.Passport_ser;
                lblPassport_num.Text = usr.Passport_num;
                lblAddress.Text      = usr.Address;

                if (usr.Birthdate.HasValue)
                {
                    lblBirthdate.Text = usr.Birthdate.Value.ToString("dd.MM.yyyy");
                }
            }
        }
예제 #5
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     dgUsers.DataSource = AppClients.GetByFilter(txtSearch.Text);
     dgUsers.DataBind();
 }
예제 #6
0
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     AppClients.AddUser(txtInn.Text, txtSurname.Text, txtFirstname.Text, txtPatronymic.Text, txtPassport_ser.Text, txtPassport_num.Text, clnBirthdate.SelectedDate, txtAddress.Text);
     Response.Redirect("MainForm.aspx");
 }