コード例 #1
0
        /// <summary>
        /// 1.2.检测当天的预约列表是否存在
        /// </summary>
        /// <param name="p_checkroomno"></param>
        /// <param name="p_checkdate"></param>
        public void CheckAppointmentList(string p_checkroomno, DateTime p_checkdate)
        {
            DataTable dt = AppointmentList_Class.GetAppointmentList(p_checkroomno, p_checkdate);

            if ((dt == null) || (dt.Rows.Count == 0))
            {
            }
        }
コード例 #2
0
        public static AppointmentList_Class GetAppointmentKey(string p_listno, DateTime p_checkdate, string check_status, DateTime begintime, string checkroomno, string accessno)
        {
            DataTable dt        = new DataTable();
            var       classlist = new AppointmentList_Class();
            string    str       = "select * from appointmentlist where listno='" + p_listno + "' and checkdate = to_date('" + p_checkdate.ToString("yyyy-MM-dd") + "','yyyy-MM-dd') ";

            if (check_status != "")
            {
                str += " and  check_status ='" + check_status + "' ";
            }
            if (checkroomno != "")
            {
                str += " and  checkroomno ='" + checkroomno + "' ";
            }
            if (accessno != "")
            {
                str += " and  accessno ='" + accessno + "' ";
            }
            if (begintime != null && (begintime.Year != 1900))
            {
                str += " and  begintime = to_date('" + begintime.ToString("yyyy-MM-dd hh:mm:ss") + "','yyyy-MM-dd hh24:mi:ss')";
            }

            str += " order by begintime ";

            dt = sql_Class.GetDataTable(str);
            dt = sql_Class.GetDataTable(str);
            if (dt == null)
            {
                return(classlist);
            }
            if (dt.Rows.Count == 0)
            {
                return(classlist);
            }
            classlist = new AppointmentList_Class(dt.Rows[0]);
            return(classlist);
        }
コード例 #3
0
        public string GetAppointmentKey(string p_listno, DateTime p_checkdate)
        {
            var list = AppointmentList_Class.GetAppointmentKey(p_listno, p_checkdate, "未预约", p_checkdate.Date, "", "");

            return(list.ID.ToString());
        }