| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Data;
- namespace Core.StlMes.Client.Sale.SaleFundMgt.Common
- {
- public class SaleFundCommon
- {
- /// <summary>
- /// 检查结算单位,客户名称,二级单位,合同单位有效性
- /// </summary>
- /// <param name="balancesubject"></param>
- /// <param name="buyercode"></param>
- /// <param name="secondaccount"></param>
- /// <param name="pactno"></param>
- /// <param name="errMsg"></param>
- /// <returns></returns>
- public static Boolean IsReasonable(string balancesubject, string buyercode, string secondaccount, string pactno, out string errMsg)
- {
- errMsg = "";
- try
- {
- if (balancesubject.Length == 0)
- {
- errMsg = "结算单位空";
- return false;
- }
- if (buyercode.Length == 0)
- {
- errMsg = "客户单位空";
- return false;
- }
- if (secondaccount.Length == 0)
- {
- errMsg = "二级账户单位空";
- return false;
- }
- if (pactno.Length == 0)
- {
- errMsg = "合同号空";
- return false;
- }
- }
- catch(Exception ex)
- {
- errMsg = ex.Message;
- return false;
- }
- return true;
- }
- public static Boolean IsReasonable(string balancesubject, string buyercode, string secondaccount,out string errMsg)
- {
- errMsg = "";
- return IsReasonable(balancesubject, buyercode, secondaccount, "PACT", out errMsg);
- }
- public static Boolean IsReasonable(string balancesubject, string buyercode, out string errMsg)
- {
- errMsg = "";
- return IsReasonable(balancesubject, buyercode, "secondaccount", "PACT", out errMsg);
- }
- public static string GetBusiSeq()
- {
- return Util.DateTimeUtil.GetSystemDate() + new System.Random().Next(100000);
- }
- }
- }
|