Example #1
0
        private void btn_save_master_company_Click(object sender, EventArgs e)
        {
            string dpPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "allcars.sqlite");
            var    db     = new SQLiteConnection(dpPath);

            db.CreateTable <Tbl_Company>();
            Tbl_Company tbl = new Tbl_Company();

            tbl.Company_Name = txt_master_company.Text;
            db.Insert(tbl);
            Toast.MakeText(this, "Record Added Successfully...,", ToastLength.Short).Show();
            txt_master_company.Text = "";
            load_spiner_master_company();
        }
Example #2
0
        private void btn_update_master_company_Click(object sender, EventArgs e)
        {
            string dpPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "allcars.sqlite");
            var    db     = new SQLiteConnection(dpPath);

            var item = new Tbl_Company();

            item.Id = Convert.ToInt32(txtviewid.Text);



            item.Company_Name = txt_master_company.Text;


            db.Update(item);

            Toast.MakeText(this, "Record Updated Successfully...,", ToastLength.Short).Show();

            load_spiner_master_company();
        }