Пример #1
0
        /// <summary>
        /// 获取指定车辆关联的仓库
        /// </summary>
        /// <param name="Vehicle"></param>
        /// <returns></returns>
        public CM_WareHouse GetRelateWareHouse()
        {
            CM_Vehicle v = new CM_VehicleBLL(_m.ID).Model;

            if (v != null)
            {
                IList <CM_WareHouse> list = CM_WareHouseBLL.GetModelList("ID = " + v.RelateWareHouse.ToString());
                if (list.Count > 0)
                {
                    return(list[0]);
                }
            }
            return(null);
        }
Пример #2
0
 /// <summary>
 /// 获取指定员工关联的车辆
 /// </summary>
 /// <param name="Staff">员工ID</param>
 /// <returns></returns>
 public static IList <CM_Vehicle> GetVehicleByStaff(int Staff)
 {
     return(CM_VehicleBLL.GetModelList("ID IN (SELECT Vehicle FROM MCS_CM.dbo.CM_VehicleInStaff WHERE Staff = " + Staff.ToString() + ") AND State=1"));
 }