示例#1
0
        private SystemConfigGroup GetData()
        {
            SystemConfigGroup entity = new SystemConfigGroup();

            entity.system_configuration_group_code        = txtCode.Text;
            entity.system_configuration_group_name        = txtName.Text;
            entity.system_configuration_group_description = txtDescription.Text;
            entity.created_by   = "";
            entity.created_date = DateTime.Now;
            entity.updated_by   = "";
            entity.updated_date = DateTime.Now;
            return(entity);
        }
示例#2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            SystemConfigGroup entity = GetData();

            if (mode == ObjectState.Add)
            {
                ServiceProvider.SystemConfigGroupService.Insert(entity);
            }
            else
            {
                ServiceProvider.SystemConfigGroupService.Update(entity);
            }
            base.formBase.ShowMessage(GeneralMessage.SaveComplete);
            base.onNotifyReturnEvent(ControlMode.Save);
        }
示例#3
0
        private void LoadData()
        {
            SystemConfigGroup entity = new SystemConfigGroup();

            if (mode == ObjectState.Edit && !string.IsNullOrEmpty(keyCode))
            {
                entity.system_configuration_group_code = keyCode;
                entity = ServiceProvider.SystemConfigGroupService.FindByKeys(entity, true);

                txtCode.Text        = entity.system_configuration_group_code;
                txtName.Text        = entity.system_configuration_group_name;
                txtDescription.Text = entity.system_configuration_group_description;
            }
            else
            {
                txtCode.Text        = string.Empty;
                txtName.Text        = string.Empty;
                txtDescription.Text = string.Empty;
            }
            EnableMode();
        }