Beispiel #1
0
        public void DeleteUnit(UnitInfo obj)
        {
            string Qry = "DELETE FROM Unit WHERE UnitID='" + obj.UnitID + "'";


            DbUtility.ExecuteQuery(Qry);
        }
Beispiel #2
0
        public void UpdateUnit(UnitInfo obj)
        {
            string Qry = "update Unit set UnitName='" + obj.UnitName + "'where UnitID='" + obj.UnitID + "'";


            DbUtility.ExecuteQuery(Qry);
        }
Beispiel #3
0
        private void btndelete_Click(object sender, EventArgs e)
        {
            obj = new UnitInfo();
            obj.UnitID = txtunitid.Text;
            obj.UnitName = txtunitname.Text;

            UnitInfoBLL bllObj = new UnitInfoBLL();
            bllObj.Delete(obj);

            MessageBox.Show("Data deleted  successfully !");
            this.LoadUnit();
        }
Beispiel #4
0
        private void loadTOModel()
        {
            obj = new UnitInfo();
            obj.UnitID = txtunitid.Text;
            obj.UnitName = txtunitname.Text;
            
            UnitInfoBLL bllObj = new UnitInfoBLL();
            bllObj.SaveUnit(obj);

            MessageBox.Show("Data successfully Saved!");
            this.LoadUnit();



        }
Beispiel #5
0
 public void SaveUnit(UnitInfo obj)
 {
     string Qry = "INSERT INTO [CureDB].[dbo].[Unit]([UnitID],[UnitName])VALUES('" + obj.UnitID + "','" + obj.UnitName + "') ";
     DbUtility.ExecuteQuery(Qry);
 }
Beispiel #6
0
 public void Delete(UnitInfo obj)
 {
     dalObj = new UnitInfoDAL();
     dalObj.DeleteUnit(obj);
 }
Beispiel #7
0
 public void UpdateUnit(UnitInfo obj)
 {
     dalObj = new UnitInfoDAL();
     dalObj.UpdateUnit(obj);
 }
Beispiel #8
0
 public void SaveUnit(UnitInfo obj)
 {
     dalObj = new UnitInfoDAL();
     dalObj.SaveUnit(obj);
 }