コード例 #1
0
        /// <summary>
        /// 保存
        /// </summary>
        private bool Save()
        {
            bool flag = false;

            try
            {
                if (ListCustomerpermission == null)
                {
                    return(false);
                }

                if (ListCustomerpermission.Count() == 0)
                {
                    return(false);
                }

                ObservableCollection <CustomerPermission> entsSubmit = new ObservableCollection <CustomerPermission>();
                ListCustomerpermission.ForEach(item =>
                {
                    entsSubmit.Add(item);
                });

                if (FormType == FormTypes.New)
                {
                    client.SetCutomterPermissionObjAsync(RoleID, entsSubmit, strResMsg);
                }
                else
                {
                    client.SetCutomterPermissionObjAsync(RoleID, entsSubmit, strResMsg);
                }
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message));
            }

            return(flag);
        }