Beispiel #1
0
        private void DoSave()
        {
            try
            {
                var data = new roletbl
                {
                    roleName    = TxtRoleName.Text,
                    description = TxtDescription.Text,
                    creaBy      = currentUser,
                    creaDate    = DatetimeHelper.GetDatetimeNow()
                };

                var ret = roleControl.AddData(data);

                ClearFields();
                SetLayout(ModeForm.ViewData);
                Alert("data berhasil disimpan");
            }
            catch (Exception ex)
            {
                LogHelpers.source  = this.GetType().Name;
                LogHelpers.message = ex.InnerException.ToString();
                LogHelpers.user    = "";
                LogHelpers.WriteLog();
                Alert("Gagal menyimpan data");
            }
        }
        private void DoSave()
        {
            var data = new roletbl
            {
                roleName    = TxtRoleName.Text,
                description = TxtDescription.Text,
                creaBy      = currentUser,
                creaDate    = DatetimeHelper.GetDatetimeNow()
            };

            var ret = roleControl.AddData(data);

            if (ret.Result)
            {
                ClearFields();
                SetLayout(ModeForm.ViewData);
                Alert("data berhasil disimpan");
            }
            else
            {
                Alert("Gagal menyimpan data");
            }
        }