コード例 #1
0
        /// <summary>
        /// 验证LED设置状态是否重复
        /// </summary>
        /// <returns></returns>
        public bool ChkPrintState()
        {
            bool chkState = false;

            try
            {
                string sql = "";
                if (isUpdate)
                {
                    sql = "Select * from PrintInfo where print_State='启动' and print_ID!=" + int.Parse(this.lvwUserList.SelectedRows[0].Cells["print_id"].Value.ToString()) + "  and print_carType_ID = " + int.Parse(this.lvwUserList.SelectedRows[0].Cells["Print_CarType_Id"].Value.ToString()) + "";
                }
                else
                {
                    sql = "Select * from PrintInfo where print_State='启动'  and print_carType_ID = " + comboxCartype.SelectedValue + "";
                }
                chkState = PrintInfoDAL.ChkPrintState(sql);
            }
            catch
            {
                CommonalityEntity.WriteTextLog("PrintSetForm ChkPositionLEDState()");
            }
            return(chkState);
        }