public List <object> Login(string user, string pwd, string yzm, string systemYzm) { List <object> result = new List <object>(); if (Verification.VerificationCode.ComparisonVerCode(yzm, systemYzm)) { pwd = Md5.GetMd5Word(pwd); List <staff> staffs = base.Search(d => d.staff_Password == pwd && d.staff_Username == user && d.staff_IsDel == false); if (staffs.Count != 0) { staff sf = staffs[0]; if (sf.staff_IsWrite == false) { company parseCompany = new FindGGFatherCompanyByCompany().FindGGFatherCompany(sf.company); if (parseCompany.company_Status == 1) { result.Add(1); result.Add("登陆成功!"); result.Add(sf.staff_Id); } else if (parseCompany.company_Status == 0) { result.Add(0); result.Add("调查未开始!无权登陆....."); } else if (parseCompany.company_Status >= 2) { result.Add(0); result.Add("调查已结束!无权登陆....."); } } else { result.Add(2); result.Add("问卷已填写!无权登陆....."); result.Add(sf.staff_Id); } } else { result.Add(0); result.Add("账号或密码输入错误!"); } } else { result.Add(0); result.Add("验证码错误!"); } return(result); }
public List <testInfo> GetTestInfo(string id) { string parentId = new FindGGFatherCompanyByCompany().FindGGFatherCompany(new Company().Search(d => d.company_Id == id && d.company_IsDel == false)[0]).company_Id; return(base.Search(d => d.testInfo_OwnComPanyId == parentId && d.testInfo_IsDel == false)); }
public int GetCompnayStatus(string id) { company companys = new FindGGFatherCompanyByCompany().FindGGFatherCompany(base.Search(d => d.company_Id == id && d.company_IsDel == false)[0]); return(companys.company_Status); }