public async Task <ActionResult <AtResult <InformationUserDmOutput> > > CreateInformation_API([FromBody] InformationUserDmInput input)
        {
            if (await CheckPermission(_context))
            {
                try
                {
                    var output = await _logicInformation.CreateInfromationUser(input);

                    if (output != null)
                    {
                        return(new AtResult <InformationUserDmOutput>(output));
                    }

                    return(new AtResult <InformationUserDmOutput>(AtNotify.InsertFail));
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            else
            {
                return(new AtResult <InformationUserDmOutput>(AtNotify.KhongCoQuyenTruyCap));
            }
        }
Exemple #2
0
        public async Task <ActionResult> CreateInformation_Basic(InformationUserDmInput input)
        {
            try
            {
                var output = await _logicInformation.CreateInfromationUser(input);

                if (output != null)
                {
                    return(RedirectToAction(nameof(DanhSachInformation_Basic)));
                }
                else
                {
                    return(View());
                }
            }
            catch
            {
                return(View());
            }
        }
Exemple #3
0
        public async Task <ActionResult <AtResult <InformationUserDmOutput> > > CreateInformation_API(InformationUserDmInput input)
        {
            try
            {
                var output = await _logicInformation.CreateInfromationUser(input);

                if (output != null)
                {
                    return(new AtResult <InformationUserDmOutput>(output));
                }

                return(new AtResult <InformationUserDmOutput>(Notify.InsertFail));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }