Exemplo n.º 1
0
 public static void DeleteType(TypeSalaryModel t)
 {
     using (IDbConnection cnn = new SQLiteConnection(LoadConectionString()))
     {
         cnn.Execute("delete from TypeSalary where ID=@ID", t);
     }
 }
Exemplo n.º 2
0
 public static void SaveType(TypeSalaryModel t)
 {
     using (IDbConnection cnn = new SQLiteConnection(LoadConectionString()))
     {
         cnn.Execute("insert into TypeSalary (Name) values (@Name)", t);
     }
 }
Exemplo n.º 3
0
        private void metroButton2_Click(object sender, EventArgs e)
        {
            FrmType ft = new FrmType();

            ft.ShowDialog();
            txtname.Text = ft.ts.Name;
            t            = ft.ts;
        }
Exemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            TypeSalaryModel t = new TypeSalaryModel();

            t.Name = txtname.Text;
            SqlliteDataAccess.SaveType(t);
            FMessageBox.Show("با موفقیت ذخیره شد", "پیام");
            InitializeBinding();
        }
Exemplo n.º 5
0
        private void button2_Click(object sender, EventArgs e)
        {
            TypeSalaryModel t = new TypeSalaryModel();

            t.ID = Convert.ToInt32(dgvhokm.CurrentRow.Cells[0].Value);
            SqlliteDataAccess.DeleteType(t);
            FMessageBox.Show("با موفقیت حذف شد", "پیام");
            txtname.ResetText();
            InitializeBinding();
        }