protected void btnKaydet_Click(object sender, EventArgs e)
        {
            try
            {
                Language language = new Language();
                Users    user     = (Users)Session["user"];

                language.Code         = txtCode.Text;
                language.LanguageName = txtLanguage.Text;
                language.Logo         = lblInfo.Text;
                if (int.Parse(RadioButtonList1.SelectedItem.Value) == 1)
                {
                    language.IsActive = true;
                }
                else
                {
                    language.IsActive = false;
                }
                language.CreatedBy   = user.ID;
                language.CreatedDate = DateTime.Now;

                _languageService.Add(language);

                clear();
                Butonvisible(true);
                panelVisible(true, true, false, false);
                Uyari("Kayıt işlemi başarıyla gerçekleşti", true);
            }
            catch (Exception)
            {
                Uyari("Kayıt işlemi sırasında bir hata oluştu", false);
            }
        }
 public HttpResponseMessage AddLanguage([FromBody] LanguageVM domain)
 {
     try
     {
         _LanguageService.Add(domain.MapVM_DM());
         var msg = Request.CreateResponse(HttpStatusCode.Created, domain);
         msg.Headers.Location = new Uri(Request.RequestUri + "/" + domain.ID.ToString());
         return(msg);
     }
     catch (Exception ex)
     {
         //Errors in this scope indicates system error (not validation errors)
         //If error exist but not handled, log it and add system error
         if (!globalErrors.ErrorHandled)
         {
             globalErrors.AddSystemError("Service Error: Cannot Add Languages!");
             globalErrors.ErrorHandled = true;
             return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
         }
         throw;
     }
 }