Exemplo n.º 1
0
        public List <AccInfo> AccountsAIDetails(string accNum, string Dfrom, string Dto, string category, string f_twhom)
        {
            AccInfoC c = new AccInfoC();

            if (Dfrom == "")
            {
                Dfrom = "01/01/1900";
            }
            if (Dto == "")
            {
                Dto = DateTime.Now.ToShortDateString();
            }
            try
            {
                if (Convert.ToDateTime(Dfrom) > DateTime.Now)
                {
                    throw new Exception();
                }
                if (Convert.ToDateTime(Dto) > DateTime.Now)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Date");
            }
            return(c.ListBelongToBank(accNum, Dfrom, Dto, category, f_twhom));
        }
Exemplo n.º 2
0
        public List <AccInfo> SearchAccInfo(string bankNum, string dfrom, string dto, string category, string t_fWhom)
        {
            try
            {
                if (dfrom == "")
                {
                    dfrom = new DateTime(1900, 01, 01).ToShortDateString();
                }
                Convert.ToDateTime(dfrom);
            }
            catch
            {
                throw new Exception("Unavailable From Date");
            }
            try
            {
                if (dto == "")
                {
                    dto = DateTime.Now.ToShortDateString();
                }
                Convert.ToDateTime(dto);
            }
            catch
            {
                throw new Exception("Unavailable To Date");
            }

            AccInfoC infoC = new AccInfoC();

            return(infoC.ListBelongToBank(bankNum, dfrom, dto, category, t_fWhom));
        }