Exemplo n.º 1
0
        public bool RemoveHod_Allocation(RemoveHod_AllocationDTO obj)
        {
            bool       res = false;
            SqlCommand cmd = new SqlCommand("sp_RemoveHod_AllocationId");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@p_HodAllocationId", obj.HodAllocationId);
            int result = new DBlayer().ExecuteNonQuery(cmd);

            if (result != Int32.MaxValue)
            {
                res = true;
            }
            return(res);
        }
Exemplo n.º 2
0
        public HttpResponseMessage RemoveHod_Allocation(RemoveHod_AllocationDTO obj)
        {
            HttpResponseMessage message;

            try
            {
                Hod_AllocationDAL dal = new Hod_AllocationDAL();
                var dynobj            = new { result = dal.RemoveHod_Allocation(obj) };
                message = Request.CreateResponse(HttpStatusCode.OK, dynobj);
            }
            catch (Exception ex)
            {
                message = Request.CreateResponse(HttpStatusCode.BadRequest, new { msgText = "something Wrong.Try Again!" });
            }
            return(message);
        }