示例#1
0
        public DataView GetOperatorGroups(string condition)
        {
            OperatorsDataSet OpData = new OperatorsDataSet();
            IDataAdapter     Adp    = base.GetAdapter(cte.AdbT_OperatorGroups);

            return(((OperatorsDataSet)base.FillData(Adp, OpData, condition)).OperatorGroups.DefaultView);
        }
示例#2
0
        public void UpdateOperatorGroup(int GroupId, string GroupName, short Status)
        {
            OperatorsDataSet OpData = new OperatorsDataSet();
            IDataAdapter     Adp    = base.GetAdapter(cte.AdbT_OperatorGroups);

            OperatorsDataSet.OperatorGroupsRow row = OpData.OperatorGroups.NewOperatorGroupsRow();
            row.GroupId = GroupId;
            OpData.OperatorGroups.AddOperatorGroupsRow(row);
            row.AcceptChanges();
            row.GroupName = GroupName;
            row.XmlFile   = GroupName;

            base.UpdateData(Adp, OpData);
        }
示例#3
0
        public bool AddOperatorGroup(string GroupName)
        {
            System.Data.DataView dv = GetOperatorGroups("GroupName='" + StringUtils.SQLEncode(GroupName) + "'");
            if (dv.Count > 0)
            {
                return(false);
            }
            OperatorsDataSet OpData = new OperatorsDataSet();
            IDataAdapter     Adp    = base.GetAdapter(cte.AdbT_OperatorGroups);

            OperatorsDataSet.OperatorGroupsRow row = OpData.OperatorGroups.NewOperatorGroupsRow();
            row.GroupName = GroupName;
            row.XmlFile   = GroupName;
            OpData.OperatorGroups.AddOperatorGroupsRow(row);
            base.UpdateData(Adp, OpData);
            return(true);
        }
示例#4
0
        public void DeleteOperatorGroup(int GroupId, string path)
        {
            System.Data.DataView dv = this.GetOperatorGroups("GroupId=" + GroupId.ToString());
            path = lw.WebTools.WebContext.Server.MapPath(CTE.Folders.ManagerSchemas + "/" + dv[0]["GroupName"].ToString());

            OperatorsDataSet OpData = new OperatorsDataSet();
            IDataAdapter     Adp    = base.GetAdapter(cte.AdbT_OperatorGroups);

            OperatorsDataSet.OperatorGroupsRow row = OpData.OperatorGroups.NewOperatorGroupsRow();
            row.GroupId = GroupId;

            OpData.OperatorGroups.AddOperatorGroupsRow(row);
            row.AcceptChanges();
            row.Delete();
            base.UpdateData(Adp, OpData);

            if (System.IO.File.Exists(path))
            {
                System.IO.File.Delete(path);
            }
        }