Exemplo n.º 1
0
        /// <summary>
        /// 设置表单编辑属性
        /// </summary>
        /// <param name="flag"></param>
        private void SetGridPolicy(bool flag)
        {
            DataPolicy dpItm = new DataPolicy
            {
                ClassName   = typeof(OrdPrintDO).FullName,
                AllowNew    = false,
                AllowCancel = false,
                AllowEdit   = flag,
                AllowFilter = false,
                AllowRemove = false,
                AllowSave   = false,
                AllowSearch = false,
                FullEdit    = flag,
                InlineEdit  = flag,
                MultiSelect = false,
                AutoNewRow  = false,
                HideOther   = false,
            };

            this.xapFormControl1.SetEditPolicy(flag, new[] { dpItm });

            if (this.gridOrdsLong != null)
            {
                this.gridOrdsLong.ReadOnly = true;
            }
            if (this.gridOrdsTemp != null)
            {
                this.gridOrdsTemp.ReadOnly = true;
            }
        }
Exemplo n.º 2
0
        private void SetGridPolicy(bool flag)
        {
            DataPolicy policy = new DataPolicy();

            policy.ClassName = "iih.ci.ord.ciordems.d.EmsObsItemDO";
            //policy.AllowNew = flag;
            policy.AllowEdit = flag;
            //policy.AllowRemove = flag;
            //policy.AllowSave = false;
            policy.FullEdit = flag;
            //policy.HideOther = true;
            //policy.MultiSelect = true;
            DataPolicy policy1 = new DataPolicy()
            {
                ClassName = "iih.ci.ord.ciordems.d.EmsObsLap",
                AllowEdit = flag,
                FullEdit  = flag
            };

            xapFormControl1.SetEditPolicy(flag, new DataPolicy[2] {
                policy, policy1
            });

            //gv_change.ReadOnly = false;
            //gv.ReadOnly = true;
            //gv.DataTable.ReadOnly = true;
        }
Exemplo n.º 3
0
        /// <summary>
        /// 设置列表的数据访问规则
        /// </summary>
        /// <param name="flag"></param>
        public virtual void SetDataPolicy(bool flag)
        {
            if (this.xapFormControl == null)
            {
                return;
            }

//             if (this.allowEdit == flag)
//                 return;

            this.allowEdit = flag;

            DataPolicy policy = new DataPolicy();

            // 允许新建
            policy.AllowNew = false;
            // 允许编辑
            policy.AllowEdit = flag;
            // 允许删除
            policy.AllowRemove = false;
            // 允许保存
            policy.AllowSave = false;
            //
            policy.FullEdit = true;
            // 多选
            policy.MultiSelect = true;
            policy.InlineEdit  = true;
            // 自动增加新行
            policy.AutoNewRow = false;

            // 表单容器对象设置规则
            this.xapFormControl.SetEditPolicy(flag, new DataPolicy[1] {
                policy
            });
        }
 /// <summary>
 /// Initializes a new instance of the BackupElement class.
 /// </summary>
 /// <param name="sizeInBytes">The size in bytes.</param>
 /// <param name="endpointName">The name of the endpoint.</param>
 /// <param name="dataPolicy">The data policy of backed up endpoint.
 /// Possible values include: 'Invalid', 'Local', 'Tiered',
 /// 'Cloud'</param>
 /// <param name="id">The identifier.</param>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 public BackupElement(long sizeInBytes, string endpointName, DataPolicy dataPolicy, string id = default(string), string name = default(string), string type = default(string))
     : base(id, name, type)
 {
     SizeInBytes  = sizeInBytes;
     EndpointName = endpointName;
     DataPolicy   = dataPolicy;
     CustomInit();
 }
Exemplo n.º 5
0
        public void SetPolicy(bool enable)
        {
            DataPolicy ploicy = new DataPolicy();

            ploicy.FullEdit  = enable;
            ploicy.AllowEdit = enable;
            ploicy.ClassName = "iih.ci.ord.cior.d.CiordInviteConsDO";
            this.xapFormControl.SetEditPolicy(true, new DataPolicy[] { ploicy });
        }
 /// <summary>
 /// Initalizes fileshare instance
 /// </summary>
 /// <param name="fileShare"></param>
 /// <param name="dataPolicy"></param>
 public static void Initialize(this FileShare fileShare, DataPolicy dataPolicy)
 {
     fileShare.AdminUser                  = TestConstants.DomainUser;
     fileShare.DataPolicy                 = dataPolicy;
     fileShare.Description                = "Demo FileShare for SDK Test " + dataPolicy.ToString();
     fileShare.MonitoringStatus           = MonitoringStatus.Enabled;
     fileShare.ShareStatus                = ShareStatus.Online;
     fileShare.ProvisionedCapacityInBytes = TestConstants.ProvisionedCapacityInBytesForNonLocal;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initalizes iscsidisk instance
 /// </summary>
 /// <param name="iscsiDisk"></param>
 /// <param name="dataPolicy"></param>
 public static void Initialize(this ISCSIDisk iscsiDisk, DataPolicy dataPolicy)
 {
     iscsiDisk.Description                = "Demo IscsiDisk for SDK Test " + dataPolicy.ToString();
     iscsiDisk.AccessControlRecords       = new List <string>();
     iscsiDisk.DataPolicy                 = dataPolicy;
     iscsiDisk.DiskStatus                 = DiskStatus.Online;
     iscsiDisk.ProvisionedCapacityInBytes = TestConstants.ProvisionedCapacityInBytesForDisk;
     iscsiDisk.MonitoringStatus           = MonitoringStatus.Enabled;
 }
Exemplo n.º 8
0
        private void SetGridPolicy(bool flag)
        {
            DataPolicy dp = new DataPolicy
            {
                ClassName = "iih.ci.ord.ciordems.d.EmsItemInOp",
                AllowEdit = flag,
                FullEdit  = true
            };

            xapFormControl.SetEditPolicy(flag, new [] { dp });
        }
Exemplo n.º 9
0
        void xapFormControl_FormCreated(object sender, EventArgs e)
        {
            DataPolicy ploicy = new DataPolicy();

            ploicy.FullEdit  = true;
            ploicy.AllowEdit = true;
            ploicy.ClassName = "iih.ci.ord.cior.d.CiordInviteConsDO";
            this.xapFormControl.SetEditPolicy(true, new DataPolicy[] { ploicy });
            gv = this.xapFormControl.GetGridView("grid");
            gv.DataTable.Columns["Name_dep"].ReadOnly = true;
        }
Exemplo n.º 10
0
        private void SetGridPolicy(bool flag)
        {
            DataPolicy policy = new DataPolicy
            {
                ClassName = "iih.ci.ord.ciordems.d.EmsItemInCons",
                FullEdit  = flag
                            //AllowEdit = flag
            };

            xapFormControl.SetEditPolicy(flag, new[] { policy });
        }
Exemplo n.º 11
0
        private DataPolicy SetEditable(bool editable)
        {
            DataPolicy dpMain = new DataPolicy()
            {
                ClassName  = typeof(CiOrdBtTestDO).ToString(),
                InlineEdit = true,
                FullEdit   = true,
                AllowEdit  = true
            };

            return(dpMain);
        }
Exemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the FileShare class.
 /// </summary>
 /// <param name="shareStatus">The Share Status. Possible values
 /// include: 'Online', 'Offline'</param>
 /// <param name="dataPolicy">The data policy. Possible values include:
 /// 'Invalid', 'Local', 'Tiered', 'Cloud'</param>
 /// <param name="adminUser">The user/group who will have full
 /// permission in this share. Active directory email address. Example:
 /// [email protected] or Contoso\xyz.</param>
 /// <param name="provisionedCapacityInBytes">The total provisioned
 /// capacity in Bytes</param>
 /// <param name="monitoringStatus">The monitoring status. Possible
 /// values include: 'Enabled', 'Disabled'</param>
 /// <param name="id">The identifier.</param>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 /// <param name="description">Description for file share</param>
 /// <param name="usedCapacityInBytes">The used capacity in
 /// Bytes.</param>
 /// <param name="localUsedCapacityInBytes">The local used capacity in
 /// Bytes.</param>
 public FileShare(ShareStatus shareStatus, DataPolicy dataPolicy, string adminUser, long provisionedCapacityInBytes, MonitoringStatus monitoringStatus, string id = default(string), string name = default(string), string type = default(string), string description = default(string), long?usedCapacityInBytes = default(long?), long?localUsedCapacityInBytes = default(long?))
     : base(id, name, type)
 {
     Description = description;
     ShareStatus = shareStatus;
     DataPolicy  = dataPolicy;
     AdminUser   = adminUser;
     ProvisionedCapacityInBytes = provisionedCapacityInBytes;
     UsedCapacityInBytes        = usedCapacityInBytes;
     LocalUsedCapacityInBytes   = localUsedCapacityInBytes;
     MonitoringStatus           = monitoringStatus;
     CustomInit();
 }
Exemplo n.º 13
0
        private DataPolicy SetItemEditable(bool editable)
        {
            DataPolicy dp = new DataPolicy()
            {
                ClassName   = typeof(CiOrdBtTestItmDO).ToString(),
                FullEdit    = editable,
                AllowRemove = editable,
                AllowEdit   = editable,
                AllowNew    = editable
            };

            return(dp);
        }
Exemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the ISCSIDisk class.
 /// </summary>
 /// <param name="diskStatus">The disk status. Possible values include:
 /// 'Online', 'Offline'</param>
 /// <param name="accessControlRecords">The access control
 /// records.</param>
 /// <param name="dataPolicy">The data policy. Possible values include:
 /// 'Invalid', 'Local', 'Tiered', 'Cloud'</param>
 /// <param name="provisionedCapacityInBytes">The provisioned capacity
 /// in bytes.</param>
 /// <param name="monitoringStatus">The monitoring. Possible values
 /// include: 'Enabled', 'Disabled'</param>
 /// <param name="id">The identifier.</param>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 /// <param name="description">The description.</param>
 /// <param name="usedCapacityInBytes">The used capacity in
 /// bytes.</param>
 /// <param name="localUsedCapacityInBytes">The local used capacity in
 /// bytes.</param>
 public ISCSIDisk(DiskStatus diskStatus, IList <string> accessControlRecords, DataPolicy dataPolicy, long provisionedCapacityInBytes, MonitoringStatus monitoringStatus, string id = default(string), string name = default(string), string type = default(string), string description = default(string), long?usedCapacityInBytes = default(long?), long?localUsedCapacityInBytes = default(long?))
     : base(id, name, type)
 {
     Description                = description;
     DiskStatus                 = diskStatus;
     AccessControlRecords       = accessControlRecords;
     DataPolicy                 = dataPolicy;
     ProvisionedCapacityInBytes = provisionedCapacityInBytes;
     UsedCapacityInBytes        = usedCapacityInBytes;
     LocalUsedCapacityInBytes   = localUsedCapacityInBytes;
     MonitoringStatus           = monitoringStatus;
     CustomInit();
 }
Exemplo n.º 15
0
        /// <summary>
        /// 发送树节点选中事件到卡上显示数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SetGridPolicy(bool flag)
        {
            DataPolicy policy = new DataPolicy();

            policy.AllowNew    = false;
            policy.AllowEdit   = flag;
            policy.AllowRemove = false;
            policy.AllowSave   = false;
            policy.FullEdit    = flag;

            xapFormControl1.SetEditPolicy(flag, new DataPolicy[1] {
                policy
            });
        }
Exemplo n.º 16
0
        private void SetEditable(bool editable)
        {
            DataPolicy dpMain = new DataPolicy()
            {
                ClassName  = typeof(CiRptObsDO).ToString(),
                InlineEdit = true,
                FullEdit   = editable,
                AllowEdit  = editable
            };

            this.xapFormControl1.SetEditPolicy(editable, new DataPolicy[1] {
                dpMain
            });
        }
Exemplo n.º 17
0
        /// <summary>
        /// CreateView执行完毕后,用LoadData的数据填充界面
        /// </summary>
        protected override void OnFillData()
        {
            var file = new FormFile();

            file.FormId    = CiOrdBillFormTmplConst.CIORD_IP_OpOrderItemView;// "20151022075428682WGO";
            file.FormStyle = FormStyle.Card;
            if (this.viewModel != null && this.viewModel.xapList != null)
            {
                file.ViewModel = this.viewModel.xapList;
            }
            this.xapFormControl1.ViewFile = file;
            var dp = new DataPolicy();

            dp.MultiSelect = true;
            this.xapFormControl1.SetEditPolicy(false, new DataPolicy[] { dp });
        }
Exemplo n.º 18
0
        private void SetGridPolicy(bool flag)
        {
            DataPolicy policy = new DataPolicy();

            policy.AllowNew    = flag;
            policy.AllowEdit   = flag;
            policy.AllowRemove = flag;
            //policy.AllowSave = false;
            //policy.FullEdit = flag;
            //policy.HideOther = true;
            policy.MultiSelect = true;

            xapFormControl1.SetEditPolicy(flag, new DataPolicy[1] {
                policy
            });
        }
Exemplo n.º 19
0
        private void SetGridPolicy(bool flag)
        {
            DataPolicy policy = new DataPolicy();

            policy.ClassName = "iih.ci.ord.ciordems.d.EmsOrDrug";
            //policy.AllowNew = flag;
            //policy.AllowEdit = flag;
            //policy.AllowRemove = flag;
            //policy.AllowSave = false;
            policy.FullEdit = flag;
            //policy.HideOther = true;
            //policy.MultiSelect = true;

            xapFormControl1.SetEditPolicy(flag, new DataPolicy[1] {
                policy
            });
        }
Exemplo n.º 20
0
        internal static string ToSerializedValue(this DataPolicy value)
        {
            switch (value)
            {
            case DataPolicy.Invalid:
                return("Invalid");

            case DataPolicy.Local:
                return("Local");

            case DataPolicy.Tiered:
                return("Tiered");

            case DataPolicy.Cloud:
                return("Cloud");
            }
            return(null);
        }
Exemplo n.º 21
0
        private void SetGridPolicy(bool flag)
        {
            DataPolicy policy = new DataPolicy
            {
                ClassName  = "iih.ci.ord.ciordems.d.EmsItemInCons",
                FullEdit   = flag,
                AllowEdit  = flag,
                InlineEdit = flag,
                AutoNewRow = flag,
                AllowNew   = flag
            };
            DataPolicy policy1 = new DataPolicy
            {
                ClassName = "iih.ci.ord.ciordems.d.EmsConsItemDO",
                FullEdit  = flag,
                AllowEdit = flag
            };

            xapFormControl.SetEditPolicy(flag, new[] { policy, policy1 });
        }
Exemplo n.º 22
0
        private void setEditPolicy(bool p = true)
        {
            DataPolicy policy = new DataPolicy();

            // 允许新建
            policy.AllowNew = false;
            // 允许编辑
            policy.AllowEdit = p;
            // 允许删除
            policy.AllowRemove = false;
            // 允许保存
            policy.AllowSave = false;
            //
            policy.FullEdit = p;
            // 多选
            policy.MultiSelect = true;
            policy.InlineEdit  = true;
            // 自动增加新行
            policy.AutoNewRow = false;
            xapFromControl.SetEditPolicy(p, new DataPolicy[1] {
                policy
            });
        }
Exemplo n.º 23
0
 public MultiMapDataStore(DataPolicy dataPolicy)
 {
     this.dataPolicy   = dataPolicy;
     this.mapDatabases = new List <MapDataStore>();
 }