Esempio n. 1
0
        public bool ValidDateEntry(DBSite site, string acc_id, string payment_date)
        {
            string qry = " SELECT CreationDate FROM tblAccountMaster "
                         + " WHERE AccountMasterId=" + acc_id;

            DataTable dt  = site.ExecuteSelect(qry);
            DataRow   row = dt.Rows[0];

            DateTime date = Convert.ToDateTime(row["CreationDate"]);
            string   acc_creation_date = date.ToShortDateString();

            return(util.isDateRangeValid(acc_creation_date, payment_date));
        }
Esempio n. 2
0
        public bool ValidMovementDateEntry(DBSite site, string product_ids, string issueDate)
        {
            string qry = " SELECT CreatedAt FROM tblProductMaster "
                         + " WHERE ProductMasterId IN (" + product_ids + ")";

            bool validIssueDate = true;

            DataTable dt = site.ExecuteSelect(qry);

            foreach (DataRow row in dt.Rows)
            {
                DateTime date = Convert.ToDateTime(row["CreatedAt"]);
                string   product_creation_date = date.ToShortDateString();

                validIssueDate = util.isDateRangeValid(product_creation_date, issueDate);
            }

            return(validIssueDate);
        }