Ejemplo n.º 1
0
        public bool Update(int ID, string ZhangHao, string MiMa,
                           bool GangTingGZ, bool LEDGongZhi, bool DianYuanGZ, ref string OutInfo)
        {
            bool   vResult = false;
            string vSql    = string.Format("Select *From `管理员` Where ID<>{0} and ZhangHao='{1}'", ID, ZhangHao);

            ManagerEFModel[] vSelectResult = m_BasicDBClass.SelectCustomEx <ManagerEFModel>(vSql);
            if (vSelectResult == null || vSelectResult.Length == 0)
            {
                ManagerEFModel vManagerEFModel = new ManagerEFModel()
                {
                    ZhangHao   = ZhangHao,
                    MiMa       = MiMa,
                    DianYuanGZ = DianYuanGZ,
                    GangTingGZ = GangTingGZ,
                    LEDGongZhi = LEDGongZhi,
                    ID         = ID
                };
                vResult = m_BasicDBClass.UpdateRecord(vManagerEFModel);
            }
            else
            {
                OutInfo = "管理员帐号重复";
            }
            return(vResult);
        }
Ejemplo n.º 2
0
        bool findGanTing(int GangTingID, string DianYuanID)
        {
            //string vSql = string.Format("Select *From `岗亭配置` Where GangTingID={0} or DianYuan1ID='{1}'", GangTingID, DianYuanID);
            string vSql = string.Format("Select *From `岗亭配置` Where GangTingID={0}", GangTingID);

            return(m_BasicDBClass.SelectCustomEx <WatchHouseConfigEFModel>(vSql).Length > 0 ? true : false);
        }
Ejemplo n.º 3
0
        bool findGonHaoKaoHao(int gongHao, string kaHao)
        {
            bool   vResult = false;
            string vSql    = string.Format("Select *From `员工信息` Where KaHao='{0}' or GongHao={1}", kaHao, gongHao);

            EmployeeEFModel[] vSelectResult = m_BasicDBClass.SelectCustomEx <EmployeeEFModel>(vSql);
            if (vSelectResult == null || vSelectResult.Length > 0)
            {
                vResult = true;
            }
            return(vResult);
        }