Esempio n. 1
0
        /// <summary>
        /// 获取表单动作
        /// </summary>
        /// <param name="billKindId"></param>
        /// <param name="billActionType"></param>
        /// <param name="con"></param>
        /// <returns></returns>
        public DataSet GetBillAction(string billKindId, BillActionType billActionType, string con)
        {
            string sql = " select a.bill_action_id Id, a.bill_kind_id KindId, a.bill_action_code Code "
                         + " ,a.create_flag CreateFlag, a.modify_flag ModifyFlag, a.approve_flag ApproveFlag "
                         + " , a.reject_flag RejectFlag, a.cancel_flag CancelFlag,a.bill_action_name Description,a.display_index display_index "
                         + " from t_def_bill_action a "
                         + "where a.bill_kind_id= '" + billKindId + "'  and a.customer_id = '" + this.loggingSessionInfo.CurrentLoggingManager.Customer_Id + "'"
                         + con;
            PublicService p = new PublicService();

            sql = p.GetLinkSql(sql, "a.bill_action_code", billActionType.ToString(), "=");

            DataSet ds = new DataSet();

            ds = this.SQLHelper.ExecuteDataset(sql);
            return(ds);
        }
Esempio n. 2
0
        /// <summary>
        /// 获取表单动作
        /// </summary>
        /// <param name="loggingSession">登录信息</param>
        /// <param name="billKindId">类型标识</param>
        /// <param name="billActionType">动作标识</param>
        /// <returns></returns>
        public BillActionModel GetBillAction(LoggingSessionInfo loggingSession, string billKindId, BillActionType billActionType)
        {
            Hashtable hashTable = new Hashtable();

            hashTable.Add("LanguageKindId", loggingSession.CurrentLanguageKindId);
            hashTable.Add("BillKindId", billKindId);
            hashTable.Add("BillActionCode", billActionType.ToString());
            hashTable.Add("CustomerId", loggingSession.CurrentLoggingManager.Customer_Id);
            BillActionModel billAction = null;

            switch (billActionType)
            {
            case BillActionType.Create:
                billAction = cSqlMapper.Instance(loggingSession.CurrentLoggingManager).QueryForObject <BillActionModel>("BillAction.GetCreateActionByKindId", hashTable);
                break;

            case BillActionType.Modify:
                billAction = cSqlMapper.Instance(loggingSession.CurrentLoggingManager).QueryForObject <BillActionModel>("BillAction.GetModifyActionByKindId", hashTable);
                break;

            case BillActionType.Approve:
                billAction = cSqlMapper.Instance(loggingSession.CurrentLoggingManager).QueryForObject <BillActionModel>("BillAction.GetApproveActionByKindId", hashTable);
                break;

            case BillActionType.Reject:
                billAction = cSqlMapper.Instance(loggingSession.CurrentLoggingManager).QueryForObject <BillActionModel>("BillAction.GetRejectActionByKindId", hashTable);
                break;

            case BillActionType.Cancel:
                billAction = cSqlMapper.Instance(loggingSession.CurrentLoggingManager).QueryForObject <BillActionModel>("BillAction.GetCancelActionByKindId", hashTable);
                break;

            case BillActionType.Open:
                billAction = cSqlMapper.Instance(loggingSession.CurrentLoggingManager).QueryForObject <BillActionModel>("BillAction.GetOpenActionByKindId", hashTable);
                break;

            case BillActionType.Stop:
                billAction = cSqlMapper.Instance(loggingSession.CurrentLoggingManager).QueryForObject <BillActionModel>("BillAction.GetStopActionByKindId", hashTable);
                break;

            default:
                return(null);
            }
            return(billAction);
        }