//设备类型属性 public static string GetDevKindPropDetail(uint?prop) { UniClientModule module = new UniClientModule(); string str = ""; if (prop == null) { return(str); } if (((uint)prop & (uint)UNIDEVKIND.DWPROPERTY.DEVPROP_SHARE) > 0) { str += "<span class='uni_trans'>多人共享</span>、"; } if (((uint)prop & (uint)UNIDEVKIND.DWPROPERTY.DEVPROP_LONGTERMRESV) > 0) { str += "<span class='uni_trans'>支持长期</span>、"; } if (((uint)prop & (uint)UNIDEVKIND.DWPROPERTY.DEVPROP_KINDRESV) > 0) { str += "<span class='uni_trans'>" + module.Translate("类型预约") + " </span>、"; } if (((uint)prop & (uint)UNIDEVKIND.DWPROPERTY.DEVPROP_LEASE) > 0) { str += "<span class='uni_trans'>" + module.Translate("支持外借") + " </span>、"; } if (str.Length > 0) { str = str.Substring(0, str.Length - 1); } return(str); }
//预约规则详情 public static string GetRsvRuleDetail(UNIRESVRULE rule) { UniClientModule module = new UniClientModule(); string str = ""; if (rule.CheckTbl != null && rule.CheckTbl.Length > 0 && (rule.CheckTbl[0].dwProperty & (uint)RULECHECKINFO.DWPROPERTY.CHECKPROP_MAIN) > 0) { str += "<span class='uni_trans'>需审核</span>、"; } if (((uint)rule.dwLimit & (uint)UNIRESVRULE.DWLIMIT.RESVLIMIT_NEEDAPP) > 0) { str += "<span class='uni_trans'>需提交申请报告</span>、"; } if (((uint)rule.dwLimit & (uint)UNIRESVRULE.DWLIMIT.RESVLIMIT_DEVKIND) > 0) { str += "<span class='uni_trans'>" + module.Translate("类型预约") + "</span>"; } if (((uint)rule.dwLimit & (uint)UNIRESVRULE.DWLIMIT.RESVLIMIT_DEV) > 0) { str += "<span class='uni_trans'>预约具体对象</span>、"; } if (((uint)rule.dwLimit & (uint)UNIRESVRULE.DWLIMIT.RESVLIMIT_NOCONFLICTCHECK) > 0) { str += "<span class='uni_trans'>不检查设备冲突</span>、"; } if (str.Length > 0) { str = str.Substring(0, str.Length - 1); } return(str); }
//考勤状态 public static string GetAttendState(uint?sta) { UniClientModule module = new UniClientModule(); string str = ""; if ((sta & (int)UNIRESVREC.DWSTATUS.RESVRECSTAT_SICK) > 0) { str += "<span style='color:orange'>病假</span> "; } if ((sta & (int)UNIRESVREC.DWSTATUS.RESVRECSTAT_PRIVATE) > 0) { str += "<span style='color:orange'>事假</span> "; } if ((sta & (int)UNIRESVREC.DWSTATUS.RESVRECSTAT_UNSIGN) > 0) { str += "<span style='color:red'>" + module.Translate("未签到") + "</span> "; } if ((sta & (int)UNIRESVREC.DWSTATUS.RESVRECSTAT_LOGINED) > 0) { str += "<span style='color:yellowgreen'>已登录</span> "; } if ((sta & (int)UNIRESVREC.DWSTATUS.RESVRECSTAT_SIGNED) > 0) { str += "<span style='color:green'>已签到</span> "; } if ((sta & (int)UNIRESVREC.DWSTATUS.RESVRECSTAT_ATTEND) > 0) { str += "<span style='color:green'>出席</span> "; } if ((sta & (int)UNIRESVREC.DWSTATUS.RESVRECSTAT_ABSENT) > 0) { str += "<span style='color:orange'>缺席</span> "; } if ((sta & (int)UNIRESVREC.DWSTATUS.RESVRECSTAT_LATE) > 0) { str += "<span style='color:orange'>迟到</span> "; } if ((sta & (int)UNIRESVREC.DWSTATUS.RESVRECSTAT_LEAVE) > 0) { str += "<span style='color:orange'>早退</span> "; } if ((sta & (int)UNIRESVREC.DWSTATUS.RESVRECSTAT_USELESS) > 0) { str += "<span style='color:orange'>使用时间不达标</span> "; } return(str); }
public static string RsvCheckStaConverterT(uint?sta) { UniClientModule module = new UniClientModule(); if (sta == null) { return(""); } if ((sta & 1073741824) > 0) { return("<span style='color:grey'>已过期</span>"); } if ((sta & 512) > 0) { return("<span style='color:green'>" + module.Translate("已生效") + " </span>"); } if ((sta & 4) > 0) { return("<span style='color:green'>通过</span>"); } if ((sta & 2) > 0) { return("<span style='color:green'>通过</span>"); } if ((sta & (int)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_ADMINOK) > 0) { return("<span style='color:green'>通过</span>"); } if ((sta & (int)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_ADMINFAIL) > 0) { return("<span style='color:orange'>未通过</span>"); } if ((sta & 1) > 0) { return("<span style='color:red'>未审核</span>"); } return("<span style='color:red'>未审核</span>"); }
//预约状态 public static string ResvStatusConverter(uint?sta) { UniClientModule module = new UniClientModule(); if (sta == null) { return(""); } if ((sta & ((uint)UNIRESERVE.DWSTATUS.RESVSTAT_DEFAULT)) > 0) { return("<span class='red uni_trans'>已违约</span>"); } if ((sta & ((uint)UNIRESERVE.DWSTATUS.RESVSTAT_DONE)) > 0) { return("<span class='grey uni_trans'>已结束</span>"); } if ((sta & ((uint)UNIRESERVE.DWSTATUS.RESVSTAT_CANCEL)) > 0) { return("<span class='grey uni_trans'>已取消</span>"); } if ((sta & ((uint)UNIRESERVE.DWSTATUS.RESVSTAT_DOING)) > 0) { return("<span class='green uni_trans'>" + module.Translate("已生效") + " </span>"); } if ((sta & ((uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_ADMINFAIL)) > 0) { return("<span class='orange uni_trans'>审核未过</span>"); } if ((sta & ((uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_DOING)) > 0) { return("<span class='orange uni_trans'>" + module.Translate("等待审核") + " </span>"); } if ((sta & ((uint)UNIRESERVE.DWSTATUS.RESVSTAT_UNDO)) > 0) { return("<span class='orange uni_trans'>" + module.Translate("预约成功") + "</span>"); } return("<span class='grey uni_trans'>无状态</span>");; }
//信用状态 public static string GetCreditRecState(uint?sta) { UniClientModule module = new UniClientModule(); string str = ""; if (sta == null) { return(str); } if ((sta & (int)CREDITREC.DWUSERCSTAT.USERCSTAT_VALID) > 0) { str = "<span style='color:orange'>" + module.Translate("有效") + " </span>"; } if ((sta & (int)CREDITREC.DWUSERCSTAT.USERCSTAT_CANCEL) > 0) { str = "<span style='color:green'>" + module.Translate("管理员取消") + " </span>"; } if ((sta & (int)CREDITREC.DWUSERCSTAT.USERCSTAT_OVER) > 0) { str = "<span style='color:grey'>" + module.Translate("已过期") + " </span>"; } return(str); }
public static string RsvCheckStaConverter(uint?sta) { UniClientModule module = new UniClientModule(); if (sta == null) { return(""); } if ((sta & 1073741824) > 0) { return("<span style='color:grey'>已过期</span>"); } if ((sta & 512) > 0) { return("<span style='color:green'>" + module.Translate("已生效") + "</span>"); } if ((sta & 4) > 0) { return("<span style='color:red'>审核未过</span>"); } if ((sta & 2) > 0) { return("<span style='color:green'>审核通过</span>"); } if ((sta & 1) > 0) { return("<span style='color:red'>未审核</span>"); } if ((sta & 256) > 0) { return("<span style='color:green'>审核通过</span>"); } return(""); }
//预约状态含审核 public static string ResvStatusWithCheck(uint?sta, bool isDetail) { UniClientModule module = new UniClientModule(); if (sta == null) { return(""); } string str = "<span class='grey uni_trans'>无状态</span>"; string detail = ""; if (isDetail) { if ((sta & (int)UNIRESERVE.DWSTATUS.RESVSTAT_FORMAL) > 0) { detail += "<span style='color:green' class='uni_trans'>预约成功</span>" + ","; } if ((sta & (int)UNIRESERVE.DWSTATUS.RESVSTAT_UNDO) > 0) { detail += "<span style='color:orange' class='uni_trans'>未生效</span>" + ","; } } if ((sta & (int)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_WAIT) > 0) { str = "<span style='color:orange' class='uni_trans'>等待上级审核</span>"; detail += str + ","; } if ((sta & (int)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_DOING) > 0) { str = "<span style='color:yellowgreen' class='uni_trans'>正在审核</span>"; detail += str + ","; } if ((sta & (int)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_ADMINFAIL) > 0) { str = "<span style='color:orange' class='uni_trans'>审核未通过</span>"; detail += str + ","; } if ((sta & (int)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_OK) > 0) { str = "<span style='color:green' class='uni_trans'>审核通过</span>"; detail += str + ","; } if ((sta & ((uint)UNIRESERVE.DWSTATUS.RESVSTAT_DOING)) > 0) { str = "<span class='green uni_trans'>" + module.Translate("已生效") + "</span>"; detail += str + ","; } if ((sta & ((uint)UNIRESERVE.DWSTATUS.RESVSTAT_CANCEL)) > 0) { str = "<span class='grey uni_trans'>已取消</span>"; detail += str + ","; } if ((sta & ((uint)UNIRESERVE.DWSTATUS.RESVSTAT_DONE)) > 0) { str = "<span class='grey uni_trans'>已结束</span>"; detail += str + ","; } if ((sta & ((uint)UNIRESERVE.DWSTATUS.RESVSTAT_DEFAULT)) > 0) { str = "<span class='red uni_trans'>已违约</span>"; detail += str + ","; } if (detail != "") { detail = detail.Substring(0, detail.Length - 1); } if (isDetail) { return(detail); } else { return(str); } }