Ejemplo n.º 1
0
        /// <summary>
        /// 返回某条回采巷道信息
        /// </summary>
        /// <param name="tunnelHCID">回采巷道ID</param>
        /// <returns>回采巷道实体</returns>
        public static TunnelHCEntity selectTunnelHC(int tunnelHCID)
        {
            ManageDataBase db             = new ManageDataBase(DATABASE_TYPE.MiningSchedulingDB);
            string         sql            = "SELECT * FROM " + TunnelHCDbConstNames.TABLE_NAME + " WHERE " + TunnelHCDbConstNames.ID + " = " + tunnelHCID;
            DataSet        ds             = db.ReturnDS(sql);
            TunnelHCEntity tunnelHCEntity = new TunnelHCEntity();

            if (ds.Tables[0].Rows.Count > 0)
            {
                try
                {
                    tunnelHCEntity.ID           = (int)ds.Tables[0].Rows[0][TunnelHCDbConstNames.ID];
                    tunnelHCEntity.TunnelID_ZY  = (int)ds.Tables[0].Rows[0][TunnelHCDbConstNames.TUNNEL_ID1];
                    tunnelHCEntity.TunnelID_FY  = (int)ds.Tables[0].Rows[0][TunnelHCDbConstNames.TUNNEL_ID2];
                    tunnelHCEntity.TunnelID_KQY = (int)ds.Tables[0].Rows[0][TunnelHCDbConstNames.TUNNEL_ID3];
                    tunnelHCEntity.TeamNameID   = (int)ds.Tables[0].Rows[0][TunnelHCDbConstNames.TEAM_NAME_ID];
                    tunnelHCEntity.StartDate    = Convert.ToDateTime(ds.Tables[0].Rows[0][TunnelHCDbConstNames.START_DATE]);
                    tunnelHCEntity.IsFinish     = (int)ds.Tables[0].Rows[0][TunnelHCDbConstNames.IS_FINISH];
                    tunnelHCEntity.StopDate     = Convert.ToDateTime(ds.Tables[0].Rows[0][TunnelHCDbConstNames.STOP_DATE]);
                    tunnelHCEntity.WorkStyle    = ds.Tables[0].Rows[0][TunnelHCDbConstNames.WORK_STYLE].ToString();
                    tunnelHCEntity.WorkTime     = ds.Tables[0].Rows[0][TunnelHCDbConstNames.WORK_TIME].ToString();
                }
                catch
                {
                    return(null);
                }
            }
            else
            {
                return(null);
            }
            return(tunnelHCEntity);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="tunnelHCEntity">回采巷道实体</param>
        public Form_TunnelHCEntering(TunnelHCEntity tunnelHCEntity)
        {
            this.tunnelHCEntity    = tunnelHCEntity;
            this.tmpTunnelHCEntity = tunnelHCEntity;
            this.Text = Const_GM.TUNNEL_JJ_CHANGE;
            InitializeComponent();

            LibCommon.FormDefaultPropertiesSetter.SetEnteringFormDefaultProperties(this, Const_GM.TUNNEL_HC_CHANGE);
        }
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="tunnelHCEntity">回采巷道实体</param>
        public Form_TunnelHCEntering(TunnelHCEntity tunnelHCEntity)
        {
            this.tunnelHCEntity = tunnelHCEntity;
            this.tmpTunnelHCEntity = tunnelHCEntity;
            this.Text = Const_GM.TUNNEL_JJ_CHANGE;
            InitializeComponent();

            LibCommon.FormDefaultPropertiesSetter.SetEnteringFormDefaultProperties(this, Const_GM.TUNNEL_HC_CHANGE);
        }
Ejemplo n.º 4
0
        public static void clearTunnelTypeOfHC(int tunnelHCID)
        {
            TunnelHCEntity tunnelHCEntity = selectTunnelHC(tunnelHCID);

            if (tunnelHCEntity != null)
            {
                TunnelInfoBLL.clearTunnelType(tunnelHCEntity.TunnelID_ZY);
                TunnelInfoBLL.clearTunnelType(tunnelHCEntity.TunnelID_FY);
                TunnelInfoBLL.clearTunnelType(tunnelHCEntity.TunnelID_KQY);
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 删除回采巷道数据
        /// </summary>
        /// <returns></returns>
        public static bool deleteTunnelHC(TunnelHCEntity tunnelHCEntity)
        {
            ManageDataBase db      = new ManageDataBase(DATABASE_TYPE.MiningSchedulingDB);
            string         sql     = "DELETE FROM " + TunnelHCDbConstNames.TABLE_NAME + " WHERE " + TunnelHCDbConstNames.ID + " = " + tunnelHCEntity.ID;
            bool           bResult = db.OperateDB(sql);

            if (bResult)
            {
                clearTunnelTypeOfHC(tunnelHCEntity.ID);
            }
            return(bResult);
        }