public HttpResponseMessage Put([FromBody] Models.designation designation)
        {
            try
            {
                if (string.IsNullOrEmpty(designation.sales_designation))
                {
                    var formatter = RequestFormat.JsonFormaterString();
                    return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                        output = "error", msg = "Designation Name is Empty"
                    }, formatter));
                }
                if (string.IsNullOrEmpty(designation.sales_person_type_code))
                {
                    var formatter = RequestFormat.JsonFormaterString();
                    return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                        output = "error", msg = "Code is Empty"
                    }, formatter));
                }
                else
                {
                    designation updateDesignation = new designation
                    {
                        sales_designation_id   = designation.sales_designation_id,
                        sales_designation      = designation.sales_designation,
                        sales_person_type_code = designation.sales_person_type_code,
                        parent_designation_id  = designation.parent_designation_id,
                        sales_type_id          = designation.sales_type_id,
                        updated_by             = designation.updated_by,
                        updated_date           = DateTime.Now
                    };

                    designationRepository.EditDesignation(updateDesignation);
                    var formatter = RequestFormat.JsonFormaterString();
                    return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                        output = "success", msg = "Updated Successfully"
                    }, formatter));
                }
            }
            catch (Exception ex)
            {
                var formatter = RequestFormat.JsonFormaterString();
                return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                    output = "error", msg = ex.ToString()
                }, formatter));
            }
        }