public static int CountInvoiceNo(string invno, string supplier,string purid) { var dm = new PurInvDataManager(); var t = !string.IsNullOrEmpty(purid) ? dm.GetInvoiceCountWithHold(supplier, invno, purid) : dm.GetInvoiceCount(supplier, invno); return t; }