Exemplo n.º 1
0
        //Get the details of a particular friend

        public BillCatagory GetBillCatagoryData(int id)

        {
            try

            {
                BillCatagory billCatagory = db.BillCatagories.Find(id);

                return(billCatagory);
            }

            catch

            {
                throw;
            }
        }
Exemplo n.º 2
0
        //To Add new employee record

        public int AddBillCatagory(BillCatagory billCatagory)

        {
            try

            {
                db.BillCatagories.Add(billCatagory);

                db.SaveChanges();

                return(1);
            }

            catch

            {
                throw;
            }
        }
Exemplo n.º 3
0
        //To Delete the record of a particular employee

        public int DeleteBillCatagory(int id)

        {
            try

            {
                BillCatagory brd = db.BillCatagories.Find(id);

                db.BillCatagories.Remove(brd);

                db.SaveChanges();

                return(1);
            }

            catch

            {
                throw;
            }
        }
Exemplo n.º 4
0
        //To Update the records of a particluar friend

        public int UpdateBillCatagory(BillCatagory billCatagory)

        {
            try

            {
                db.Entry(billCatagory).State = EntityState.Modified;

                db.SaveChanges();



                return(1);
            }

            catch

            {
                throw;
            }
        }