예제 #1
0
        private void GetNewVoucherID(ref ConnectionManager conManager, bool requiredTransaction, ref CustomList <Acc_Voucher> AccVoucherList, string prifix)
        {
            String newAccVoucherID = String.Empty;

            try
            {
                CustomList <Acc_Voucher> tempAccVoucherList = AccVoucherList.FindAll(f => f.IsAdded);
                if (tempAccVoucherList.Count != 0)
                {
                    string prifix1 = prifix + "-";
                    newAccVoucherID = Convert.ToString(StaticInfo.GetUniqueCodeWithoutSignature(ref conManager, requiredTransaction, "Acc_Voucher", "VoucherNo", prifix1));
                    tempAccVoucherList[0].VoucherNo = prifix1 + newAccVoucherID;
                    voucherID = prifix1 + newAccVoucherID;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }