Exemplo n.º 1
0
        protected virtual void CountAnyField()
        {
            T_PM_UserGroupInfoApplicationLogic instanceT_PM_UserGroupInfoApplicationLogic
                = (T_PM_UserGroupInfoApplicationLogic)CreateApplicationLogicInstance(typeof(T_PM_UserGroupInfoApplicationLogic));

            appData = instanceT_PM_UserGroupInfoApplicationLogic.Count(appData);
        }
Exemplo n.º 2
0
        //=========================================================================
        //  FunctionName : Query
        /// <summary>
        /// 检索方法
        /// </summary>
        /// <param name="appData">应用数据实体</param>
        /// <returns>返回数据实体对象</returns>
        //=========================================================================
        public T_PM_UserGroupInfoApplicationData Query(T_PM_UserGroupInfoApplicationData appData)
        {
            T_PM_UserGroupInfoBusinessEntity instanceT_PM_UserGroupInfoBusinessEntity = (T_PM_UserGroupInfoBusinessEntity)CreateBusinessEntityInstance(typeof(T_PM_UserGroupInfoBusinessEntity));

            instanceT_PM_UserGroupInfoBusinessEntity.AppData = appData;
            if (instanceT_PM_UserGroupInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.PK)
            {
                instanceT_PM_UserGroupInfoBusinessEntity.SelectByKey();
                instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else if (instanceT_PM_UserGroupInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.ID)
            {
                instanceT_PM_UserGroupInfoBusinessEntity.SelectByObjectID();
                instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else if (instanceT_PM_UserGroupInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.ALL)
            {
                instanceT_PM_UserGroupInfoBusinessEntity.SelectByAnyCondition();
                instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else
            {
                instanceT_PM_UserGroupInfoBusinessEntity.SelectByAnyCondition();
                instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            return(instanceT_PM_UserGroupInfoBusinessEntity.AppData);
        }
Exemplo n.º 3
0
        protected virtual string AJAX_QueryDataSet(string strFieldName, string strFieldValue)
        {
            string strReturn = string.Empty;

            try
            {
                T_PM_UserGroupInfoApplicationLogic instanceT_PM_UserGroupInfoApplicationLogic
                    = (T_PM_UserGroupInfoApplicationLogic)CreateApplicationLogicInstance(typeof(T_PM_UserGroupInfoApplicationLogic));
                T_PM_UserGroupInfoApplicationData appData = new T_PM_UserGroupInfoApplicationData();
                appData.Sort        = false;
                appData.SortField   = "ObjectID";
                appData.PageSize    = 10;
                appData.CurrentPage = 1;
                appData.OPCode      = ApplicationDataBase.OPType.ALL;
                switch (strFieldName)
                {
                case "ObjectID":
                    appData.ObjectID = Convert.ToString(strFieldValue);
                    break;

                case "UserGroupID":
                    appData.UserGroupID = Convert.ToString(strFieldValue);
                    break;

                case "UserGroupName":
                    appData.UserGroupName = Convert.ToString(strFieldValue);
                    break;

                case "UserGroupContent":
                    appData.UserGroupContent = Convert.ToString(strFieldValue);
                    break;

                case "UserGroupRemark":
                    appData.UserGroupRemark = Convert.ToString(strFieldValue);
                    break;

                case "DefaultPage":
                    appData.DefaultPage = Convert.ToString(strFieldValue);
                    break;

                case "UpdateDate":
                    appData.UpdateDate = Convert.ToDateTime(strFieldValue);
                    break;

                default:
                    appData.PageSize = 0;
                    break;
                }
                appData = instanceT_PM_UserGroupInfoApplicationLogic.Query(appData);
                if (appData.RecordCount > 0)
                {
                    strReturn = appData.ResultSet.GetXml();
                }
            }
            catch (Exception)
            {
                strReturn = string.Empty;
            }
            return(strReturn);
        }
Exemplo n.º 4
0
 protected virtual void btnAddConfirm_Click(object sender, EventArgs e)
 {
     Session[ConstantsManager.SESSION_REDIRECT_PAGE] = CURRENT_PATH + "/" + WEBUI_SEARCH_FILENAME;
     Session[ConstantsManager.SESSION_MESSAGE_TYPE]  = "SuccessClose";
     appData = new T_PM_UserGroupInfoApplicationData();
     AddRecord();
 }
Exemplo n.º 5
0
        protected virtual bool AJAX_Delete(string strObjectID)
        {
            bool boolReturn = false;

            try
            {
                T_PM_UserGroupInfoApplicationLogic instanceT_PM_UserGroupInfoApplicationLogic
                    = (T_PM_UserGroupInfoApplicationLogic)CreateApplicationLogicInstance(typeof(T_PM_UserGroupInfoApplicationLogic));
                T_PM_UserGroupInfoApplicationData appData = new T_PM_UserGroupInfoApplicationData();
                appData.OPCode   = ApplicationDataBase.OPType.ID;
                appData.ObjectID = strObjectID;
                appData          = instanceT_PM_UserGroupInfoApplicationLogic.Query(appData);
                if (appData.RecordCount > 0)
                {
                    appData = instanceT_PM_UserGroupInfoApplicationLogic.Delete(appData);
                    if (appData.ResultCode == ApplicationDataBase.ResultState.Succeed)
                    {
                        boolReturn = true;
                    }
                    else
                    {
                        boolReturn = false;
                    }
                }
                else
                {
                    boolReturn = false;
                }
            }
            catch (Exception)
            {
                boolReturn = false;
            }
            return(boolReturn);
        }
Exemplo n.º 6
0
 protected virtual void btnModifyConfirm_Click(object sender, EventArgs e)
 {
     Session[ConstantsManager.SESSION_REDIRECT_PAGE] = CURRENT_PATH + "/" + WEBUI_SEARCH_FILENAME;
     Session[ConstantsManager.SESSION_MESSAGE_TYPE]  = "SuccessClose";
     appData        = new T_PM_UserGroupInfoApplicationData();
     appData.OPCode = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID;
     ModifyRecord();
 }
Exemplo n.º 7
0
        //=========================================================================
        //  FunctionName : Count
        /// <summary>
        /// 统计记录数方法
        /// </summary>
        /// <param name="appData">应用数据实体</param>
        /// <returns>返回数据实体对象</returns>
        //=========================================================================
        public T_PM_UserGroupInfoApplicationData Count(T_PM_UserGroupInfoApplicationData appData)
        {
            T_PM_UserGroupInfoBusinessEntity instanceT_PM_UserGroupInfoBusinessEntity = (T_PM_UserGroupInfoBusinessEntity)CreateBusinessEntityInstance(typeof(T_PM_UserGroupInfoBusinessEntity));

            instanceT_PM_UserGroupInfoBusinessEntity.AppData = appData;
            instanceT_PM_UserGroupInfoBusinessEntity.CountByAnyCondition();
            instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            return(instanceT_PM_UserGroupInfoBusinessEntity.AppData);
        }
Exemplo n.º 8
0
        //=========================================================================
        //  FunctionName : Modify
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="appData">应用数据实体</param>
        /// <returns>返回数据实体对象</returns>
        //=========================================================================
        public T_PM_UserGroupInfoApplicationData Modify(T_PM_UserGroupInfoApplicationData appData)
        {
            T_PM_UserGroupInfoBusinessEntity instanceT_PM_UserGroupInfoBusinessEntity = (T_PM_UserGroupInfoBusinessEntity)CreateBusinessEntityInstance(typeof(T_PM_UserGroupInfoBusinessEntity));

            instanceT_PM_UserGroupInfoBusinessEntity.AppData = appData;
            if (instanceT_PM_UserGroupInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.PK)
            {
                if (instanceT_PM_UserGroupInfoBusinessEntity.IsExistByKey() == true)
                {
                    instanceT_PM_UserGroupInfoBusinessEntity.UpdateByKey();
                    instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
                }
                else
                {
                    instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Failure;
                }
            }
            else if (instanceT_PM_UserGroupInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.ID)
            {
                if (instanceT_PM_UserGroupInfoBusinessEntity.IsExistByObjectID() == true)
                {
                    instanceT_PM_UserGroupInfoBusinessEntity.UpdateByObjectID();
                    instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
                }
                else
                {
                    instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Failure;
                }
            }
            else if (instanceT_PM_UserGroupInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.BATCH)
            {
                instanceT_PM_UserGroupInfoBusinessEntity.UpdateByObjectIDBatch();
                instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else if (instanceT_PM_UserGroupInfoBusinessEntity.AppData.OPCode == ApplicationDataBase.OPType.ALL)
            {
                instanceT_PM_UserGroupInfoBusinessEntity.UpdateByAnyCondition();
                instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else
            {
                if (instanceT_PM_UserGroupInfoBusinessEntity.IsExistByObjectID() == true)
                {
                    instanceT_PM_UserGroupInfoBusinessEntity.UpdateByObjectID();
                    instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
                }
                else
                {
                    instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Failure;
                }
            }
            return(instanceT_PM_UserGroupInfoBusinessEntity.AppData);
        }
        //=====================================================================
        //  FunctionName : GetDataByObjectID
        /// <summary>
        /// 以ObjectID为条件查询记录并返回AppData
        /// </summary>
        //=====================================================================
        public static T_PM_UserGroupInfoApplicationData GetDataByObjectID(string strObjectID)
        {
            // 创建数据库连接
            Database  db          = DatabaseFactory.CreateDatabase("strConnManager");
            string    strProcName = "SP_SelectT_PM_UserGroupInfoByObjectID";
            DbCommand cmdProc     = db.GetStoredProcCommand(strProcName);

            // 设定存储过程输入参数
            db.AddInParameter(cmdProc, "@ObjectID", DbType.String);
            // 对存储过程参数赋值
            db.SetParameterValue(cmdProc, "@ObjectID", strObjectID);
            // 执行存储过程
            return(T_PM_UserGroupInfoApplicationData.FillDataFromDataReader(db.ExecuteReader(cmdProc)));
        }
Exemplo n.º 10
0
 protected virtual void QueryRecord()
 {
     if (GetQueryInputParameter())
     {
         T_PM_UserGroupInfoApplicationLogic instanceT_PM_UserGroupInfoApplicationLogic
                 = (T_PM_UserGroupInfoApplicationLogic)CreateApplicationLogicInstance(typeof(T_PM_UserGroupInfoApplicationLogic));
         appData = instanceT_PM_UserGroupInfoApplicationLogic.Query(appData);
     }
     else
     {
         // 对错误消息进行处理
         MessageContent = strMessageInfo;
         Session[ConstantsManager.SESSION_MESSAGE_TYPE] = "FaildPre";
     }
 }
Exemplo n.º 11
0
        RICH.Common.Base.ApplicationData.ApplicationDataBase SetBatchOperationValue(
            string strRelatedTableName,
            Type typeofApplicationData,
            T_PM_UserGroupInfoApplicationData appData,
            GridViewRow gvrTemp
            )
        {
            RICH.Common.Base.ApplicationData.ApplicationDataBase ApplicationData = (RICH.Common.Base.ApplicationData.ApplicationDataBase)Activator.CreateInstance(typeofApplicationData);
            Type typeField;

            Object[] objConstructParms;
            Object   objValue;

            return(ApplicationData);
        }
Exemplo n.º 12
0
 protected virtual void ModifyRecord()
 {
     if (GetModifyInputParameter())
     {
         T_PM_UserGroupInfoApplicationLogic instanceT_PM_UserGroupInfoApplicationLogic
             = (T_PM_UserGroupInfoApplicationLogic)CreateApplicationLogicInstance(typeof(T_PM_UserGroupInfoApplicationLogic));
         // 主表修改
         appData = instanceT_PM_UserGroupInfoApplicationLogic.Modify(appData);
         // 相关表批量修改
         RelatedTableModifyBatch();
         MessageContent = MessageManager.GetMessageInfo(MessageManager.HINT_MSGID_0015, new string[] { "用户组信息", "修改" }, strMessageInfo);
         string strLogContent = MessageManager.GetMessageInfo(MessageManager.LOG_MSGID_0003, new string[] { (string)Session[ConstantsManager.SESSION_USER_LOGIN_NAME], "用户组信息", appData.UserGroupName.ToString(), "修改" });
         LogLibrary.LogWrite("A02", strLogContent, null, null, null);
         Page.CloseWindow(true);
     }
 }
Exemplo n.º 13
0
        protected virtual void btnOperate_Click(object sender, EventArgs e)
        {
            switch (Request["ctl00$MainContentPlaceHolder$ddlOperation"].ToLower())
            {
            case "remove":
                appData = new T_PM_UserGroupInfoApplicationData();
                appData.ObjectIDBatch = (string)Request["ObjectIDBatch"];
                appData.OPCode        = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.BATCH;
                DeleteRecord();
                break;

            default:
                break;
            }
            Initalize();
        }
Exemplo n.º 14
0
        //=========================================================================
        //  FunctionName : Add
        /// <summary>
        /// 添加方法
        /// </summary>
        /// <param name="appData">应用数据实体</param>
        /// <returns>返回数据实体对象</returns>
        //=========================================================================
        public T_PM_UserGroupInfoApplicationData Add(T_PM_UserGroupInfoApplicationData appData)
        {
            T_PM_UserGroupInfoBusinessEntity instanceT_PM_UserGroupInfoBusinessEntity = (T_PM_UserGroupInfoBusinessEntity)CreateBusinessEntityInstance(typeof(T_PM_UserGroupInfoBusinessEntity));

            instanceT_PM_UserGroupInfoBusinessEntity.AppData = appData;
            if (instanceT_PM_UserGroupInfoBusinessEntity.IsExistByKey() == false)
            {
                instanceT_PM_UserGroupInfoBusinessEntity.Insert();
                instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Succeed;
            }
            else
            {
                instanceT_PM_UserGroupInfoBusinessEntity.AppData.ResultCode = ApplicationDataBase.ResultState.Failure;
            }
            return(instanceT_PM_UserGroupInfoBusinessEntity.AppData);
        }
Exemplo n.º 15
0
 protected virtual void DeleteRecord()
 {
     if (GetDeleteInputParameter())
     {
         T_PM_UserGroupInfoApplicationLogic instanceT_PM_UserGroupInfoApplicationLogic
                 = (T_PM_UserGroupInfoApplicationLogic)CreateApplicationLogicInstance(typeof(T_PM_UserGroupInfoApplicationLogic));
         appData = instanceT_PM_UserGroupInfoApplicationLogic.Delete(appData);
         string strLogContent = MessageManager.GetMessageInfo(MessageManager.LOG_MSGID_0003, new string[] { (string)Session[ConstantsManager.SESSION_USER_LOGIN_NAME], "用户组信息", (string)appData.ObjectIDBatch, "删除" });
         LogLibrary.LogWrite("A02", strLogContent, null, null, null);
     }
     else
     {
         // 对错误消息进行处理
         MessageContent = strMessageInfo;
         Session[ConstantsManager.SESSION_MESSAGE_TYPE] = "FaildPre";
     }
 }
Exemplo n.º 16
0
        public static IEnumerable <T_PM_UserGroupInfoApplicationData> GetCollectionFromImportDataTable(DataTable dt)
        {
            List <T_PM_UserGroupInfoApplicationData> collection = new List <T_PM_UserGroupInfoApplicationData>();

            foreach (DataRow dr in dt.Rows)
            {
                T_PM_UserGroupInfoApplicationData applicationData = new T_PM_UserGroupInfoApplicationData()
                {
                    ObjectID         = (dr.ReadGuidNullable("ObjectID") == null ? null : dr.ReadGuidNullable("ObjectID").ToString()),
                    UserGroupID      = dr.ReadString("UserGroupID"),
                    UserGroupName    = dr.ReadString("UserGroupName"),
                    UserGroupContent = dr.ReadString("UserGroupContent"),
                    UserGroupRemark  = dr.ReadString("UserGroupRemark"),
                    DefaultPage      = dr.ReadString("DefaultPage"),
                    UpdateDate       = dr.ReadDateTimeNullable("UpdateDate"),
                };
                collection.Add(applicationData);
            }
            return(collection);
        }
Exemplo n.º 17
0
 protected virtual void AddRecord()
 {
     if (GetAddInputParameter())
     {
         T_PM_UserGroupInfoApplicationLogic instanceT_PM_UserGroupInfoApplicationLogic
             = (T_PM_UserGroupInfoApplicationLogic)CreateApplicationLogicInstance(typeof(T_PM_UserGroupInfoApplicationLogic));
         // 添加主表
         appData = instanceT_PM_UserGroupInfoApplicationLogic.Add(appData);
         // 批量添加相关表
         RelatedTableAddBatch();
         if (appData.ResultCode == ApplicationDataBase.ResultState.Succeed)
         {
             MessageContent = MessageManager.GetMessageInfo(MessageManager.HINT_MSGID_0015, new string[] { "用户组信息", "添加" }, strMessageInfo);
             string strLogContent = MessageManager.GetMessageInfo(MessageManager.LOG_MSGID_0003, new string[] { (string)Session[ConstantsManager.SESSION_USER_LOGIN_NAME], "用户组信息", appData.UserGroupName.ToString(), "添加" });
             LogLibrary.LogWrite("A02", strLogContent, null, null, null);
             Page.CloseWindow(true);
         }
         else
         {
             MessageContent = MessageManager.GetMessageInfo(MessageManager.ERR_MSGID_0013, new string[] { "此编号", "用户组信息" }, strMessageInfo);
             Session[ConstantsManager.SESSION_MESSAGE_TYPE] = "FaildPre";
         }
     }
 }
Exemplo n.º 18
0
        protected virtual bool AJAX_Modify(string strFieldName, string strFieldValue, string strObjectID)
        {
            bool boolReturn = false;

            try
            {
                T_PM_UserGroupInfoApplicationLogic instanceT_PM_UserGroupInfoApplicationLogic
                    = (T_PM_UserGroupInfoApplicationLogic)CreateApplicationLogicInstance(typeof(T_PM_UserGroupInfoApplicationLogic));
                T_PM_UserGroupInfoApplicationData appData = new T_PM_UserGroupInfoApplicationData();
                appData.OPCode   = ApplicationDataBase.OPType.ID;
                appData.ObjectID = strObjectID;
                appData          = instanceT_PM_UserGroupInfoApplicationLogic.Query(appData);
                if (appData.RecordCount > 0)
                {
                    switch (strFieldName)
                    {
                    case "ObjectID":
                        appData.ObjectID = Convert.ToString(strFieldValue);
                        break;

                    case "UserGroupID":
                        appData.UserGroupID = Convert.ToString(strFieldValue);
                        break;

                    case "UserGroupName":
                        appData.UserGroupName = Convert.ToString(strFieldValue);
                        break;

                    case "UserGroupContent":
                        appData.UserGroupContent = Convert.ToString(strFieldValue);
                        break;

                    case "UserGroupRemark":
                        appData.UserGroupRemark = Convert.ToString(strFieldValue);
                        break;

                    case "DefaultPage":
                        appData.DefaultPage = Convert.ToString(strFieldValue);
                        break;

                    case "UpdateDate":
                        appData.UpdateDate = Convert.ToDateTime(strFieldValue);
                        break;
                    }
                    appData = instanceT_PM_UserGroupInfoApplicationLogic.Modify(appData);
                    if (appData.ResultCode == ApplicationDataBase.ResultState.Succeed)
                    {
                        boolReturn = true;
                    }
                    else
                    {
                        boolReturn = false;
                    }
                }
                else
                {
                    boolReturn = false;
                }
            }
            catch (Exception)
            {
                boolReturn = false;
            }
            return(boolReturn);
        }