Example #1
0
    private void LoadData(DataClassesDatabaseDataContext db)
    {
        KonfigurasiPrinter_Class Konfigurasi_ClassPrinter = new KonfigurasiPrinter_Class();

        RepeaterKonfigurasi.DataSource = Konfigurasi_ClassPrinter.Data(db);
        RepeaterKonfigurasi.DataBind();
    }
Example #2
0
    protected void ButtonSimpan_Click(object sender, EventArgs e)
    {
        using (DataClassesDatabaseDataContext db = new DataClassesDatabaseDataContext())
        {
            KonfigurasiPrinter_Class Konfigurasi_ClassPrinter = new KonfigurasiPrinter_Class();

            foreach (RepeaterItem item in RepeaterKonfigurasi.Items)
            {
                Label   LabelIDKonfigurasiPrinter = (Label)item.FindControl("LabelIDKonfigurasiPrinter");
                TextBox TextBoxPengaturan         = (TextBox)item.FindControl("TextBoxPengaturan");

                Konfigurasi_ClassPrinter.Ubah(db, LabelIDKonfigurasiPrinter.Text.ToInt(), TextBoxPengaturan.Text);
            }

            db.SubmitChanges();
        }
    }