private void InitOpenAty(uint start) { ACTIVITYPLANREQ req = new ACTIVITYPLANREQ(); req.dwGetType = (uint)ACTIVITYPLANREQ.DWGETTYPE.ACTIVITYPLANGET_BYALL; req.dwOwner = acc.dwAccNo;//河南政法要求只能参看自申请的预约 req.dwStartDate = start; req.szReqExtInfo.szOrderKey = "dwActivityDate"; req.szReqExtInfo.szOrderMode = "DESC"; UNIACTIVITYPLAN[] rlt; if (m_Request.Reserve.GetActivityPlan(req, out rlt) == REQUESTCODE.EXECUTE_SUCCESS) { for (int i = 0; i < rlt.Length; i++) { UNIACTIVITYPLAN plan = rlt[i]; string atyDate = Util.Converter.UintToDateStr(plan.dwActivityDate); string status = (plan.dwStatus & (uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_OK) > 0?"<span class='green'>已审核</span>":"<span class='orange'>未审核</span>"; string pStart = ((int)plan.dwBeginTime / 100).ToString("00") + ":" + ((int)plan.dwBeginTime % 100).ToString("00"); string pEnd = ((int)plan.dwEndTime / 100).ToString("00") + ":" + ((int)plan.dwEndTime % 100).ToString("00"); DateTime _end = DateTime.Parse(atyDate + " " + pEnd); DateTime _start = DateTime.Parse(atyDate + " " + pStart); DateTime now = DateTime.Now; string act = ""; if ((plan.dwStatus & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_CLOSED) == 0) { if ((plan.dwStatus & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_OPENING) > 0) { status += " | <span class='green'>开放中</span>"; } else { status += " | <span class='red'>不开放</span>"; } if (_start > now) { act += "<a class='click' onclick='delOpenAty(" + plan.dwActivityPlanID + "," + plan.dwResvID + ");'>" + Translate("删除") + "</a>"; } if (_end > now) { if (act != "") { act += " | "; } act += "<a class='click' onclick='pro.d.group.manage(\"" + Translate("维护成员") + "\", {group:" + plan.dwGroupID + "},function(){uni.reload();})'>" + Translate("成员") + "</a>"; } } else { status += " | <span class='grey'>已关闭</span>"; } atyList += "<tr class='it'><td>" + plan.szActivityPlanName + "</td>" + "<td>" + plan.szHostUnit + "</td>" + "<td>" + plan.szContact + "</td>" + "<td>" + plan.szSite + "</td>" + "<td>" + atyDate + " " + pStart + "-" + pEnd + "</td>" + "<td class='text-center'>" + status + "</td>" + "<td class='text-center'>" + act + "</td></tr>"; } } }
public int ControlDT(DataTable dt, UNIACTIVITYPLAN plan) { REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; AOFFLINESIGN req = new AOFFLINESIGN(); req.dwActivityPlanID = plan.dwActivityPlanID; req.dwResvID = plan.dwResvID; List <ASIGNUSER> users = new List <ASIGNUSER>(); for (int i = 0; i < dt.Rows.Count; i++) { ASIGNUSER temp = new ASIGNUSER(); int nCard = IntParse(dt.Rows[i]["cardid"].ToString()); temp.dwCardID = (uint)nCard; temp.dwInTime = Get1970Seconds(dt.Rows[i]["shuakatime"].ToString()); users.Add(temp); } req.SignUser = users.ToArray(); AOFFLINESIGN res; REQUESTCODE ucode = m_Request.Reserve.ActivityMemberOffLineSign(req, out res); if (ucode == REQUESTCODE.EXECUTE_SUCCESS && res.SignUser != null && res.SignUser.Length > 0) { return(updateDT(res.SignUser)); } return(0); }
private void SetActivityPlan(UNIACTIVITYPLAN vrParameter) { if (m_Request.Reserve.SetActivityPlan(vrParameter, out vrParameter) == REQUESTCODE.EXECUTE_SUCCESS) { REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; object obj = Session["LOGIN_ACCINFO"]; UNIACCOUNT acc = new UNIACCOUNT(); if (obj != null) { acc = (UNIACCOUNT)(obj); } GROUPMEMBER setValueMember = new GROUPMEMBER(); setValueMember.dwKind = (uint)GROUPMEMBER.DWKIND.MEMBERKIND_PERSONAL; setValueMember.dwMemberID = acc.dwAccNo; setValueMember.szName = acc.szTrueName.ToString(); setValueMember.szMemo = acc.szLogonName.ToString() + ":" + acc.szTrueName.ToString(); setValueMember.dwGroupID = vrParameter.dwGroupID; uResponse = m_Request.Group.SetGroupMember(setValueMember); MsgBox("你的申请预约已提交审核,审核结果将由短信形式发送,请注意查收"); } else { if (vrParameter.dwResvID != null && vrParameter.dwResvID != 0) { UNIRESERVE para = new UNIRESERVE(); para.dwResvID = vrParameter.dwResvID; m_Request.Reserve.Del(para); } MsgBox("对不起,申请失败" + m_Request.szErrMessage); } }
private void InitPreAty() { ACTIVITYPLANREQ req = new ACTIVITYPLANREQ(); UNIACTIVITYPLAN[] rlt; req.dwGetType = (uint)ACTIVITYPLANREQ.DWGETTYPE.ACTIVITYPLANGET_BYALL; req.dwStartDate = ToUInt(DateTime.Now.AddYears(-2).ToString("yyyyMMdd")); req.szReqExtInfo.szOrderKey = "dwActivityDate"; req.szReqExtInfo.szOrderMode = "DESC"; uint now = ToUInt(DateTime.Now.ToString("yyyyMMdd")); if (m_Request.Reserve.GetActivityPlan(req, out rlt) == REQUESTCODE.EXECUTE_SUCCESS && rlt.Length > 0) { for (int i = 0; i < rlt.Length; i++) { UNIACTIVITYPLAN plan = rlt[i]; uint stat = (uint)plan.dwStatus; if ((stat & (uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_ADMINOK) > 0) { string date = Util.Converter.UintToDateStr(plan.dwActivityDate); string status = ""; if ((stat & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_OPENING) > 0) { status = "<span class='green'>|</span>"; } else if ((stat & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_UNOPEN) > 0) { status = "<span class='red'>|</span>"; } else { status = "<span class='grey'>|</span>"; } if ((stat & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_CLOSED) > 0 && plan.dwActivityDate < now) { oldList += "<li><a class='item-content item-link' onclick=\"loginedLoad('../a/atydetail.aspx?id=" + plan.dwActivityPlanID + "&_t='+(new Date()).getTime())\"><div class='item-inner'><div class='item-title'>" + plan.szActivityPlanName + "</div><div class='item-after'>" + date + "</div></div></a></li>"; } if ((stat & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_CLOSED) == 0 && plan.dwActivityDate >= now) { newList += "<li><a class='item-content item-link' onclick=\"loginedLoad('../a/atydetail.aspx?id=" + plan.dwActivityPlanID + "&_t='+(new Date()).getTime())\"><div class='item-inner'><div class='item-title'>" + status + plan.szActivityPlanName + "</div><div class='item-after'>" + date + "</div></div></a></li>"; } else { continue; } } } } if (newList == "") { newList = "<li class='text-center uni_trans'>没有活动</li>"; } if (oldList == "") { oldList = "<li class='text-center uni_trans'>没有活动</li>"; } }
protected void Page_Load(object sender, EventArgs e) { string szop = Request["op"]; if (string.IsNullOrEmpty(szop)) { string szActivitySN = Request["sn"]; if (!string.IsNullOrEmpty(szActivitySN)) { ViewState["sn"] = szActivitySN; ACTIVITYPLANREQ req = new ACTIVITYPLANREQ(); req.dwGetType = (uint)ACTIVITYPLANREQ.DWGETTYPE.ACTIVITYPLANGET_BYID; req.szGetKey = szActivitySN; UNIACTIVITYPLAN[] res; m_Request.m_UniDCom.SessionID = (uint)Session["SessionID"]; m_Request.m_UniDCom.StaSN = 1; if (m_Request.Reserve.GetActivityPlan(req, out res) == REQUESTCODE.EXECUTE_SUCCESS && res != null && res.Length > 0) { ViewState["devid"] = res[0].dwDevID; ViewState["devsn"] = res[0].dwDevSN; UNIACTIVITYPLAN acti = new UNIACTIVITYPLAN(); acti = res[0]; activityName = acti.szActivityPlanName; if (((uint)acti.dwStatus & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_ENROLLED) > 0) { bIsIN = true; } } } } else { m_Request.m_UniDCom.SessionID = (uint)Session["SessionID"]; m_Request.m_UniDCom.StaSN = 1; ADMINLOGINRES vrLogin = (ADMINLOGINRES)Session["LoginRes"]; string atyId = ViewState["sn"].ToString(); string devId = ViewState["devid"].ToString(); string devSN = ViewState["devsn"].ToString(); if (szop == "join") { ACTIVITYENROLL set = new ACTIVITYENROLL(); set.dwActivityPlanID = uint.Parse(atyId); if (!string.IsNullOrEmpty(devId)) { set.dwDevID = uint.Parse(devId); } if (!string.IsNullOrEmpty(devSN)) { set.dwDevSN = uint.Parse(devSN); } set.dwAccNo = vrLogin.AccInfo.dwAccNo; if (m_Request.Reserve.EnrollActivity(set) == REQUESTCODE.EXECUTE_SUCCESS) { szRes = "加入成功"; } else { szRes = m_Request.szErrMessage; } } else if (szop == "out") { ACTIVITYEXIT set = new ACTIVITYEXIT(); set.dwActivityPlanID = uint.Parse(atyId); set.dwAccNo = set.dwAccNo = vrLogin.AccInfo.dwAccNo; if (m_Request.Reserve.ExitActivity(set) == REQUESTCODE.EXECUTE_SUCCESS) { szRes = "退出成功"; } } } }
protected void btnSubmint_Click(object sender, EventArgs e) { UNIACTIVITYPLAN vrParameter = new UNIACTIVITYPLAN(); //vrParameter.dwActivityPlanID = UniSZ2DW(Request["dwActivityPlanID"]); vrParameter.szActivityPlanName = Request["szActivityPlanName"]; vrParameter.szHostUnit = Request["szHostUnit"]; vrParameter.szOrganizer = Request["szOrganizer"]; vrParameter.szPresenter = Request["szPresenter"]; vrParameter.szDesiredUser = Request["szDesiredUser"]; //vrParameter.dwCheckRequirment = UniSZ2DW(Request["dwCheckRequirment"]); vrParameter.szContact = Request["szContact"]; //vrParameter.szTel = Request["szTel"]; vrParameter.szHandPhone = Request["szHandPhone"]; vrParameter.dwCheckRequirment = (uint)UNIACTIVITYPLAN.DWCHECKREQUIRMENT.ACTIVITYPLAN_NOAPPLY; vrParameter.dwKind = (uint)UNIACTIVITYPLAN.DWKIND.ACTIVITYPLANKIND_SALON; vrParameter.szEmail = Request["szEmail"]; //vrParameter.dwResvID = UniSZ2DW(Request["dwResvID"]); //vrParameter.dwGroupID = UniSZ2DW(Request["dwGroupID"]); vrParameter.dwMaxUsers = UniSZ2DW(Request["dwMaxUsers"]); vrParameter.dwMinUsers = UniSZ2DW(Request["dwMinUsers"]); //vrParameter.dwEnrollUsers = UniSZ2DW(Request["dwEnrollUsers"]); vrParameter.dwEnrollDeadline = UniSZ2DW(Request["dwEnrollDeadline"]); vrParameter.dwPublishDate = UniSZ2DW(Request["dwPublishDate"]); vrParameter.dwActivityDate = UniSZ2DW(Request["dwActivityDate"]); vrParameter.dwBeginTime = UniSZ2DW(Request["dwBeginTime"]); vrParameter.dwEndTime = UniSZ2DW(Request["dwEndTime"]); vrParameter.szSite = CurDev.szLabName + "【" + CurDev.szDevName + "】";//Request["szSite"]; vrParameter.dwDevID = CurDev.dwDevID; vrParameter.szRoomNo = CurDev.szRoomNo; //vrParameter.dwKind = UniSZ2DW(Request["dwKind"]); vrParameter.dwStatus = (uint)UNITESTPLAN.DWSTATUS.TESTPLANSTAT_UNOPEN; vrParameter.szIntroInfo = Request["szIntroInfo"]; vrParameter.szMemo = Request["szMemo"]; if (vrParameter.szActivityPlanName.ToString() == "") { MsgBox("请填写活动名称"); return; } if (vrParameter.szHostUnit.ToString() == "") { MsgBox("请填写主办单位"); return; } if (vrParameter.szPresenter.ToString() == "") { MsgBox("请填写主持人"); return; } if (vrParameter.szContact.ToString() == "") { MsgBox("请填写联系人"); return; } if (vrParameter.szHandPhone.ToString() == "") { MsgBox("请填写联系电话"); return; } if (vrParameter.dwActivityDate.ToString() == "") { MsgBox("请填写活动日期"); return; } if (vrParameter.dwBeginTime.ToString() == "") { MsgBox("请填写开始时间"); return; } if (vrParameter.dwEndTime.ToString() == "") { MsgBox("请填写结束时间"); return; } if (vrParameter.szIntroInfo.ToString() == "") { MsgBox("请填写介绍内容"); return; } if (string.IsNullOrEmpty(InputFile.Value)) { MsgBox("请上传申请材料"); return; } else { string ret = UploadFile(InputFile); if (ret == "fail") { MsgBox("上传文件失败"); return; } else { vrParameter.szApplicationURL = ret; } } if (!string.IsNullOrEmpty(szActivityPlanURL.Value)) { string ret = UploadFile(szActivityPlanURL); if (ret == "fail") { MsgBox("上传文件失败"); return; } else { vrParameter.szActivityPlanURL = ret; } } SetActivityPlan(vrParameter); }
protected void Page_Load(object sender, EventArgs e) { string szOP = "新建"; if (Request["op"] == "set") { szOP = "修改"; } if (IsPostBack) { ACTIVITYPLANREQ vrGet = new ACTIVITYPLANREQ(); vrGet.dwGetType = (uint)ACTIVITYPLANREQ.DWGETTYPE.ACTIVITYPLANGET_BYID; string szID = Request["id"]; UNIACTIVITYPLAN setActiviPlan = new UNIACTIVITYPLAN(); if (szID != null && szID != "") { vrGet.szGetKey = Request["id"]; UNIACTIVITYPLAN[] vtRes; if (m_Request.Reserve.GetActivityPlan(vrGet, out vtRes) == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { setActiviPlan = vtRes[0]; } } GetHTTPObj(out setActiviPlan); setActiviPlan.dwActivityDate = GetDate(Request["dwActivityDate"]); setActiviPlan.dwBeginTime = GetTime(Request["dwBeginTime"]); setActiviPlan.dwEndTime = GetTime(Request["dwEndTime"]); setActiviPlan.dwEnrollDeadline = GetDate(Request["dwEnrollDeadline"]); setActiviPlan.dwKind = (uint)UNIACTIVITYPLAN.DWKIND.ACTIVITYPLANKIND_EXPERIENCE; if (Request["op"] != "set") { UNIGROUP newGroup; if (NewGroup(setActiviPlan.szActivityPlanName.ToString() + "组", (uint)UNIGROUP.DWKIND.GROUPKIND_RERV, out newGroup)) { setActiviPlan.dwGroupID = newGroup.dwGroupID; } else { MessageBox(m_Request.szErrMessage, szOP + "失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); return; } setActiviPlan.dwOwner = ((ADMINLOGINRES)Session["LoginResult"]).AdminInfo.dwAccNo; } if (m_Request.Reserve.SetActivityPlan(setActiviPlan, out setActiviPlan) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, szOP + "失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); } else { MessageBox(szOP + "成功", szOP + "成功", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); return; } } DEVREQ devGet = new DEVREQ(); devGet.dwClassKind = (uint)UNIDEVCLS.DWKIND.CLSKIND_COMMONS; UNIDEVICE[] vtDev; if (m_Request.Device.Get(devGet, out vtDev) == REQUESTCODE.EXECUTE_SUCCESS && vtDev != null && vtDev.Length > 0) { for (int i = 0; i < vtDev.Length; i++) { if (((uint)vtDev[i].dwProperty & ((uint)UNIDEVICE.DWPROPERTY.DEVPROP_ACTIVITYPLAN)) > 0) { szDevList += GetInputItemHtml(CONSTHTML.option, "", vtDev[i].szDevName, vtDev[i].dwDevID.ToString()); } } } if (Request["op"] == "set") { bSet = true; ACTIVITYPLANREQ vrGet = new ACTIVITYPLANREQ(); vrGet.dwGetType = (uint)ACTIVITYPLANREQ.DWGETTYPE.ACTIVITYPLANGET_BYID; vrGet.szGetKey = Request["id"]; UNIACTIVITYPLAN[] vtRes; if (m_Request.Reserve.GetActivityPlan(vrGet, out vtRes) == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { if ((vtRes[0].dwStatus & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_CLOSED) > 0) { vtRes[0].dwStatus = (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_CLOSED; } else if ((vtRes[0].dwStatus & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_OPENING) > 0) { vtRes[0].dwStatus = (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_OPENING; } else if ((vtRes[0].dwStatus & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_UNOPEN) > 0) { vtRes[0].dwStatus = (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_UNOPEN; } PutHTTPObj(vtRes[0]); string szBeginTime = GetTimeStr(vtRes[0].dwBeginTime); ViewState["dwBeginTime"] = szBeginTime; string szEndTime = GetTimeStr(vtRes[0].dwEndTime); ViewState["dwEndTime"] = szEndTime; } } else { } }
private void InitPreAty() { ACTIVITYPLANREQ req = new ACTIVITYPLANREQ(); UNIACTIVITYPLAN[] rlt; req.dwGetType = (uint)ACTIVITYPLANREQ.DWGETTYPE.ACTIVITYPLANGET_BYID; req.szGetKey = Request["id"]; req.dwStartDate = ToUInt(DateTime.Now.AddYears(-2).ToString("yyyyMMdd")); req.szReqExtInfo.szOrderKey = "dwActivityDate"; req.szReqExtInfo.szOrderMode = "DESC"; uint now = ToUInt(DateTime.Now.ToString("yyyyMMdd")); if (m_Request.Reserve.GetActivityPlan(req, out rlt) == REQUESTCODE.EXECUTE_SUCCESS && rlt.Length > 0) { UNIACTIVITYPLAN plan = rlt[0]; uint stat = (uint)plan.dwStatus; if ((stat & (uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_ADMINOK) > 0) { string status = ""; uint dwPublishDate = (uint)plan.dwPublishDate; uint dwEnrollDeadline = (uint)plan.dwEnrollDeadline; uint dwActivityDate = (uint)plan.dwActivityDate; string startDate = Util.Converter.UintToDateStr(plan.dwActivityDate); string szResvTime = ((int)plan.dwBeginTime / 100) + ":" + ((int)plan.dwBeginTime % 100).ToString("00") + "-" + ((int)plan.dwEndTime / 100) + ":" + ((int)plan.dwEndTime % 100).ToString("00"); if (!string.IsNullOrEmpty(plan.szActivityPlanURL)) { image = "<img style=\"width:100%\" src =\"" + GetClientUrl() + "upload/UpLoadFile/" + plan.szActivityPlanURL + "\" />"; } atyDetails += "<div class='aty_detail_title'><h2> " + status + plan.szActivityPlanName + "</h2><div class='line'></div>"; if (dwActivityDate == 20990101)//时间待定 { atyDetails += "<h4 class='aty_date'>待定</h4>"; } else { atyDetails += "<h4 class='aty_date'> <span class='glyphicon glyphicon-time'></span> " + startDate + " " + szResvTime + "</h4>"; } atyDetails += "</div><div class=\"detail\">"; atyDetails += "<table style=\"width:100%;\"><tbody class='aty_detail_list'>"; atyDetails += "<tr><td class='uni_trans' style=\"width:80px\">活动主题</td><td>" + plan.szActivityPlanName.ToString() + "</td></tr>"; atyDetails += "<tr><td class='uni_trans'>主办单位</td><td>" + plan.szHostUnit.ToString() + "</td></tr>"; atyDetails += "<tr><td class='uni_trans'>承办单位</td><td>" + plan.szOrganizer.ToString() + "</td></tr>"; atyDetails += "<tr><td class='uni_trans'>主讲人</td><td>" + plan.szPresenter.ToString() + "</td></tr>"; atyDetails += "<tr><td class='uni_trans'>参与者要求</td><td class='user_require'>" + plan.szDesiredUser.ToString() + "</td></tr>"; atyDetails += "<tr><td class='uni_trans'>活动介绍</td><td class='aty_intro'>" + plan.szIntroInfo + "</td></tr>"; atyDetails += "<tr><td class='uni_trans'>联系人</td><td>" + plan.szContact.ToString() + "</td></tr>"; atyDetails += "<tr><td class='uni_trans'>联系人电话</td><td>" + plan.szHandPhone.ToString() + "</td></tr>"; atyDetails += "<tr><td class='uni_trans'>限制报名人数</td><td>" + plan.dwMaxUsers.ToString() + "</td></tr>"; atyDetails += "<tr><td class='uni_trans'>已申请人数</td><td>" + plan.dwEnrollUsers.ToString() + "</td></tr>"; if (dwActivityDate != 20990101) { if ((stat & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_OPENING) > 0) { atyDetails += "<tr><td class='uni_trans'>加入截止日期</td><td class='deadline red'>" + Util.Converter.UintToDateStr(dwEnrollDeadline) + " (" + Translate("不含当日") + ")</td></tr>"; } else if ((stat & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_UNOPEN) > 0) { atyDetails += "<tr><td class='uni_trans'>加入截止日期</td><td class='deadline red uni_trans'>不开放</td></tr>"; } else { atyDetails += "<tr><td class='uni_trans'>加入截止日期</td><td class='deadline red uni_trans'>已结束</td></tr>"; } atyDetails += "<tr><td class='uni_trans'>活动安排时间</td><td>" + startDate + " " + szResvTime + "</td></tr>"; } else { atyDetails += "<tr><td class='uni_trans'>加入截止日期</td><td class='deadline red uni_trans'>待定</td></tr>"; atyDetails += "<tr><td class='uni_trans'>活动安排时间</td><td class='uni_trans'>待定</td></tr>"; } atyDetails += "<tr><td class='uni_trans'>主办地点</td><td>" + plan.szSite.ToString() + "</td></tr></tbody></table>"; atyDetails += "<div class='aty_act content-block'><p class='text-center'>"; if (dwActivityDate != 20990101) { if (((uint)plan.dwStatus & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_OPENING) != 0) { if (((uint)plan.dwStatus & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_ENROLLED) == 0) { if (dwEnrollDeadline > ToUInt(DateTime.Now.ToString("yyyyMMdd"))) { atyDetails += "<a href='#' class=\"btn_mb button button-big button-fill\" purpose=\"in\" gid=\"" + plan.dwGroupID.ToString() + "\" >加入活动</a>"; } else { atyDetails += "<span class='red uni_trans'>已截止加入</span>"; } } else { atyDetails += "<a href='#' class=\"btn_mb button button-big button-fill\" purpose=\"out\" gid=\"" + plan.dwGroupID.ToString() + "\" >退出活动</a>"; } } } atyDetails += "</p></div></div></div></div><div>"; } } }
protected void Page_Load(object sender, EventArgs e) { base.LoadPage(); UNIACTIVITYPLAN vrParameter = new UNIACTIVITYPLAN(); vrParameter.dwActivityPlanID = ToUInt(Request["dwActivityPlanID"]); vrParameter.szActivityPlanName = Request["szActivityPlanName"]; vrParameter.szHostUnit = Request["szHostUnit"]; vrParameter.szOrganizer = Request["szOrganizer"]; vrParameter.szPresenter = Request["szPresenter"]; vrParameter.szDesiredUser = Request["szDesiredUser"]; vrParameter.dwCheckRequirment = ToUInt(Request["dwCheckRequirment"]); vrParameter.szContact = Request["szContact"]; vrParameter.szTel = Request["szTel"]; vrParameter.szHandPhone = Request["szHandPhone"]; vrParameter.dwCheckRequirment = (uint)UNIACTIVITYPLAN.DWCHECKREQUIRMENT.ACTIVITYPLAN_NOAPPLY; vrParameter.dwKind = (uint)UNIACTIVITYPLAN.DWKIND.ACTIVITYPLANKIND_SALON; vrParameter.szEmail = Request["szEmail"]; vrParameter.dwResvID = ToUInt(Request["dwResvID"]); vrParameter.dwGroupID = ToUInt(Request["dwGroupID"]); vrParameter.dwMaxUsers = ToUInt(Request["dwMaxUsers"]); vrParameter.dwMinUsers = ToUInt(Request["dwMinUsers"]); vrParameter.dwEnrollUsers = ToUInt(Request["dwEnrollUsers"]); vrParameter.dwEnrollDeadline = ToUInt(Request["dwEnrollDeadline"]); vrParameter.dwPublishDate = ToUInt(Request["dwPublishDate"]); vrParameter.dwActivityDate = ToUInt(Request["dwActivityDate"]); vrParameter.dwBeginTime = ToUInt(Request["dwBeginTime"]); vrParameter.dwEndTime = ToUInt(Request["dwEndTime"]); vrParameter.szSite = Request["szSite"]; vrParameter.dwDevID = 576; vrParameter.szRoomNo = GetRoomNoFromDevID("576"); vrParameter.dwKind = ToUInt(Request["dwKind"]); vrParameter.dwStatus = (uint)UNITESTPLAN.DWSTATUS.TESTPLANSTAT_UNOPEN; vrParameter.szIntroInfo = Request["szIntroInfo"]; vrParameter.szMemo = Request["szMemo"]; HttpPostedFile file = Request.Files["szActivityPlanURL"]; if (file != null && file.ContentLength > 0) { string szFilename = Server.UrlDecode(file.FileName); int n = szFilename.LastIndexOf("\\"); if (n >= 0) { szFilename = szFilename.Substring(n + 1); } else { n = szFilename.LastIndexOf("/"); if (n >= 0) { szFilename = szFilename.Substring(n + 1); } } szFilename = @"file_upload\" + DateTime.Now.Ticks + szFilename; string szFiles = Server.MapPath(".") + @"\" + szFilename; file.SaveAs(szFiles); szFilename = szFilename.Replace('\\', '/'); szFiles = Request.Url.AbsoluteUri; n = szFiles.LastIndexOf("/"); if (n >= 0) { szFiles = szFiles.Substring(0, n + 1); } vrParameter.szActivityPlanURL = szFiles + szFilename; } file = Request.Files["szApplicationURL"]; if (file != null && file.ContentLength > 0) { string szFilename = Server.UrlDecode(file.FileName); int n = szFilename.LastIndexOf("\\"); if (n >= 0) { szFilename = szFilename.Substring(n + 1); } else { n = szFilename.LastIndexOf("/"); if (n >= 0) { szFilename = szFilename.Substring(n + 1); } } szFilename = @"file_upload\" + DateTime.Now.Ticks + szFilename; string szFiles = Server.MapPath(".") + @"\" + szFilename; file.SaveAs(szFiles); szFilename = szFilename.Replace('\\', '/'); szFiles = Request.Url.AbsoluteUri; n = szFiles.LastIndexOf("/"); if (n >= 0) { szFiles = szFiles.Substring(0, n + 1); } vrParameter.szApplicationURL = szFiles + szFilename; } if (m_Request.Reserve.SetActivityPlan(vrParameter, out vrParameter) == REQUESTCODE.EXECUTE_SUCCESS) { REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; object obj = Session["LOGIN_ACCINFO"]; UNIACCOUNT acc = new UNIACCOUNT(); if (obj != null) { acc = (UNIACCOUNT)(obj); } GROUPMEMBER setValueMember = new GROUPMEMBER(); setValueMember.dwKind = (uint)GROUPMEMBER.DWKIND.MEMBERKIND_PERSONAL; setValueMember.dwMemberID = acc.dwAccNo; setValueMember.szName = acc.szTrueName.ToString(); setValueMember.szMemo = acc.szLogonName.ToString() + ":" + acc.szTrueName.ToString(); setValueMember.dwGroupID = vrParameter.dwGroupID; uResponse = m_Request.Group.SetGroupMember(setValueMember); szResult = "<h2>你的申请预约已提交审核</h2><p>审核结果将由短信形式发送,请注意查收</p>"; } else { if (m_Request.szErrMessage != "") { szResult = "<h2>对不起,申请失败</h2><p>" + m_Request.szErrMessage + "</p>"; } else { szResult = "<h2>对不起,申请失败</h2><p>如有疑问,请致电:0571-xxxxxxxx</p>"; } } }