private DTOResult SaveData(string mode, object model)
        {
            var da = new SEC012P001DA();

            //ในกรณีที่มีการ SaveLog ให้ Include SetStandardLog ด้วย
            SetStandardLog(
                da.DTO,
                model,
                GetSaveLogConfig("dbo", "VSMS_CONFIG_FTP", "NAME"));

            if (mode == StandardActionName.SaveModify)
            {
                SetStandardField(model);
                da.DTO.Model = (SEC012P001Model)model;
                da.Insert(da.DTO);
            }
            return(da.DTO.Result);
        }
        public ActionResult Index()
        {
            SetDefaulButton(StandardButtonMode.Create);

            var da = new SEC012P001DA();

            SetStandardErrorLog(da.DTO);
            da.DTO.Execute.ExecuteType = SEC012P001ExecuteType.GetAll;
            da.Select(da.DTO);
            if (da.DTO.Model != null)
            {
                da.DTO.Model.FTP_SERVER = Encryption.Decrypt(da.DTO.Model.FTP_SERVER.FromBase64String());
                da.DTO.Model.FTP_PRT    = Encryption.Decrypt(da.DTO.Model.FTP_PRT.FromBase64String());
                if (!string.IsNullOrEmpty(da.DTO.Model.FTP_FOLDER))
                {
                    da.DTO.Model.FTP_FOLDER = Encryption.Decrypt(da.DTO.Model.FTP_FOLDER.FromBase64String());
                }
                da.DTO.Model.USER_NAME = Encryption.Decrypt(da.DTO.Model.USER_NAME.FromBase64String());
                da.DTO.Model.PASSWORD  = Encryption.Decrypt(da.DTO.Model.PASSWORD.FromBase64String());

                localModel = da.DTO.Model;
            }
            return(View(StandardActionName.Index, localModel));
        }