Beispiel #1
0
        protected void lbtUpdateB_Click(object sender, EventArgs e)
        {
            #region [TestInput]
            if (txtName.Text.Trim().Equals(""))
            {
                WebMsgBox.Show("Name not null !");
                txtName.Focus();
                return;
            }
            #endregion

            try
            {
                var obj = new TypeFilmInfo();
                obj.TypId  = txtId.Value;
                obj.NameT  = txtName.Text;
                obj.Status = chkActive.Checked ? "1" : "0";
                if (_insert == true)
                {
                    TypeFilmService.TypeFilm_Insert(obj);
                }
                else
                {
                    TypeFilmService.TypeFilm_Update(obj);
                }
                BindGrid();
                LoadFilterNewsNameAutocomplete();
                pnView.Visible   = true;
                pnUpdate.Visible = false;
                _insert          = false;
            }
            catch (Exception ex)
            {
                WebMsgBox.Show(ex.Message);
            }
        }
 public static void TypeFilm_Update(TypeFilmInfo Data)
 {
     db.TypeFilm_Update(Data);
 }
 public static void TypeFilm_Insert(TypeFilmInfo Data)
 {
     db.TypeFilm_Insert(Data);
 }