/// <summary> /// /// </summary> public void Get考核月份() { int FK_User = CurrentUserModel.UserID; DateTime 考核月份 = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM")); Eastcom.Model.月度考核内容 model1 = new Eastcom.BLL.月度考核内容().GetModelByUser(FK_User, 考核月份); if (model1 == null) { throw new Exception("对不起,本月你未生成考题,请联系管理员!"); } else { if (model1.提交情况 == Eastcom.ConfigUntility.ConfigArgs.提交情况.已提交.ToString()) { Eastcom.Common.MessageBox.ShowAndJs(this, "您已经提交了不能再次修改答案", "window.location.href='./MyIndex.aspx'"); } FK_YDKHNR = model1.id.ToString(); } Eastcom.Model.月度考核内容_详细 model_3 = new Eastcom.BLL.月度考核内容_详细().GetUndoneId(CommonClass.StringHander.Common.GetInt(this.FK_YDKHNR)); if (model_3 == null) { undoneid = 0; } else { undoneid = Common.GetInt(model_3.考核题目编号); } }
/// <summary> /// ajax方法 /// </summary> protected void AjaxMethod() { //Eastcom.BLL.家客增量用户资料核查统计 bll = new Eastcom.BLL.家客增量用户资料核查统计(); StringBuilder strMsg = new StringBuilder(); int isReload = 0;//0:不刷新父页面 1:刷新父页面 switch (this.PageType) { case EnumPageType.导出: #region 导出 if (!string.IsNullOrEmpty(Convert.ToString(Session[StrWhereOutPut]))) { Eastcom.BLL.月度考核内容 bll = new Eastcom.BLL.月度考核内容(); DataSet ds = bll.GetOutPutViewList(Convert.ToString(Session[StrWhereOutPut]) ?? "", fieldName, ""); string TableName = "v_月度考核内容"; CommonClass.DataHandler.DataToExcel.OutPutExcel(new string[] { ExcelTableName }, PageBase.OutPutClassLst, ds, TableName, new string[] { TableName }); } else { CommonClass.StringHander.Common.ResponseClearWrite("操作失败,请刷新页面后再导出!"); } #endregion break; default: strMsg.Append("页面操作类型不明确,操作失败!"); break; } Response.Clear(); Response.Write(string.Format(@"{{""msg"":""{0}"",""isReload"":""{1}""}}", strMsg, isReload)); Response.End(); }
public void Get考核月份() { int FK_User = CurrentUserModel.UserID; YearMonth = Request.Params["YearMonth"] ?? DateTime.Now.ToString("yyyy-MM"); DateTime 考核月份 = Common.GetDateTime(Request.Params["YearMonth"] ?? "", Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM"))); Eastcom.Model.月度考核内容 model1 = new Eastcom.BLL.月度考核内容().GetModelByUser(FK_User, 考核月份); if (model1 == null) { throw new Exception("对不起,本月你未生成考题,请联系管理员!"); } else { FK_YDKHNR = model1.id.ToString(); } // Eastcom.Model.月度考核内容_详细 model_3 = new Eastcom.BLL.月度考核内容_详细().GetUndoneId(CommonClass.StringHander.Common.GetInt(this.FK_YDKHNR)); Eastcom.Model.月度考核内容_详细 model_3 = new Eastcom.BLL.月度考核内容_详细().GetModelByBH_YD(CommonClass.StringHander.Common.GetInt(this.FK_YDKHNR), Common.GetInt(id)); if (model1.提交情况 == Eastcom.ConfigUntility.ConfigArgs.提交情况.已提交.ToString()) { Standard_Answer = model_3 == null ? "" : model_3.标准答案_原; } if (model_3 == null) { undoneid = 0; } else { undoneid = Common.GetInt(model_3.考核题目编号); } }
private void InitData() { int FK_User = CurrentUserModel.UserID; DateTime 考核月份 = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM")); Eastcom.Model.月度考核内容 model1 = new Eastcom.BLL.月度考核内容().GetModelByUser(FK_User, 考核月份); if (model1 != null) { if (model1.提交情况 == Config.ConfigArgs.提交情况.已提交.ToString()) { a_MyAsk.Visible = false; IsSubmit = Config.ConfigArgs.提交情况.已提交.ToString(); } else { FK_YDKHNR = model1.id.ToString(); a_MyAsk.Visible = true; } } else { IsnullHint = "您未生成当月考核模板"; } }
/// <summary> /// /// </summary> public void AjaxMethod() { Eastcom.BLL.月度考核内容_详细 BLL_model_详细 = new Eastcom.BLL.月度考核内容_详细(); Eastcom.BLL.月度考核内容 BLL_model_列表 = new Eastcom.BLL.月度考核内容(); Eastcom.Model.月度考核内容_详细 model_详细 = null; Eastcom.Model.月度考核内容 model_列表 = null; StringBuilder strMsg = new StringBuilder(); int isReload = 0;//0:不刷新父页面 1:刷新父页面 bool IsError = false; switch (handleType) //this.PageType { case "Save": #region 保存 model_详细 = BLL_model_详细.GetModelByBH_YD(CommonClass.StringHander.Common.GetInt(FK_YDKHNR), CommonClass.StringHander.Common.GetInt(id)); strMsg.Append(this.CommonModel(model_详细)); if (strMsg.Length == 0) { if (BLL_model_详细.Update(model_详细)) { IsError = false; strMsg.Append(""); Get考核月份(); } else { IsError = true; strMsg.Append("更新失败"); } } else { IsError = false; } #endregion break; case "Submit": #region 提交 List <Eastcom.Model.月度考核内容_详细> ModelList = new List <Eastcom.Model.月度考核内容_详细>(); ModelList = BLL_model_详细.GetModelList("FK_月度考核内容='" + FK_YDKHNR + "'"); model_列表 = BLL_model_列表.GetModel(Common.GetInt(FK_YDKHNR)); decimal 总得分 = 0; if (undoneid != 0) { IsError = true; strMsg.Append("你还有未完成的题!"); } else { foreach (Eastcom.Model.月度考核内容_详细 m in ModelList) { string 用户答案 = m.用户答案 == "" ? ",,," : m.用户答案; Eastcom.Model.考试题库 model_题库 = new Eastcom.Model.考试题库(); model_题库 = new Eastcom.BLL.考试题库().GetModel(Common.GetInt(m.题目编号)); if (model_题库 != null) { UserPoint c = new UserPoint(); c = c.Get用户得分情况(用户答案, model_题库.标准答案.Trim()); m.得分 = c.用户得分; m.回答情况 = c.得分情况; BLL_model_详细.Update(m); 总得分 += Common.GetDecimal(m.得分); } } } model_列表.得分 = 总得分; model_列表.提交时间 = DateTime.Now; model_列表.提交情况 = Eastcom.ConfigUntility.ConfigArgs.提交情况.已提交.ToString(); //strMsg.Append(this.CommonModel(model_详细)); if (strMsg.Length == 0) { if (BLL_model_列表.Update(model_列表)) { IsError = false; strMsg.Append("提交成功"); } else { IsError = true; strMsg.Append("更新失败"); } } else { IsError = true; } #endregion break; default: strMsg.Append("页面操作类型不明确,操作失败!"); break; } CommonClass.Message.Log.WriteMessage(new CommonClass.Message.GoAjaxPara() { msg = strMsg.ToString(), isReload = isReload, isError = IsError, msnLog = "", Data = new ExamId() { nextid = nextid.ToString(), preid = preid.ToString(), Undoneid = undoneid.ToString() } }); }
public void AjaxMethod() { Eastcom.BLL.月度考核内容 BLL_model_列表 = new Eastcom.BLL.月度考核内容(); Eastcom.Model.月度考核内容 model_列表 = null; StringBuilder strMsg = new StringBuilder(); int isReload = 0;//0:不刷新父页面 1:刷新父页面 bool IsError = false; switch (handleType) //this.PageType { case "See": #region 查看 //model_详细 = BLL_model_详细.GetModelByBH_YD(CommonClass.StringHander.Common.GetInt(FK_YDKHNR), CommonClass.StringHander.Common.GetInt(id)); model_列表 = BLL_model_列表.GetModelByUser(CurrentUserModel.UserID, CommonClass.StringHander.Common.GetDateTime(Request.Params["ddl_Year_Month"] ?? "")); if (model_列表 == null) { IsError = true; strMsg.Append(Request.Params["ddl_Year_Month"] + ",您没有考核模板"); } //strMsg.Append(this.CommonModel(model_详细)); if (strMsg.Length == 0) { strMsg.Append(Request.Params["ddl_Year_Month"]); //if (BLL_model_详细.Update(model_详细)) //{ // IsError = false; // strMsg.Append(""); // Get考核月份(); //} //else //{ // IsError = true; // strMsg.Append("更新失败"); //} } #endregion break; case "Change": #region 查看 model_列表 = BLL_model_列表.GetModelByUser(CurrentUserModel.UserID, CommonClass.StringHander.Common.GetDateTime(Request.Params["ddl_Year_Month"] ?? "")); if (model_列表 == null) { IsError = true; strMsg.Append(Request.Params["ddl_Year_Month"] + ",您没有考核模板"); } if (strMsg.Length == 0) { if (model_列表.提交情况 == Config.ConfigArgs.提交情况.已提交.ToString()) { strMsg.Append(model_列表.得分); } else { strMsg.Append(model_列表.提交情况); } } else { IsError = false; } #endregion break; case "See_ASK_TEST": #region 进入练习模式 Eastcom.Model.日度练习考核内容 model = new Eastcom.Model.日度练习考核内容(); string 练习日期 = DateTime.Now.ToShortDateString(); int Fk_userID = CurrentUserModel.UserID; if (!new Eastcom.BLL.日度练习考核内容().Exists_Checked(练习日期, Fk_userID.ToString())) { Eastcom.Model.日度练习考核内容 练习model = new Eastcom.Model.日度练习考核内容(); model.FK_UserID = Fk_userID; /*被考核人员的ID*/ model.日期 = Convert.ToDateTime(练习日期); model.考务生成时间 = DateTime.Now; model.提交情况 = Config.ConfigArgs.提交情况.未提交.ToString(); if (new Eastcom.BLL.日度练习考核内容().Add_Tran(model) > 0) //添加方法 ZQTS.BLL.MaintianManage_Month_Main_Info() { } } else { //IsError = true; //strMsg.Append("你未生成当天练习题,请重新点击生成练习数据!"); } #endregion break; default: strMsg.Append("页面操作类型不明确,操作失败!"); break; } CommonClass.Message.Log.WriteMessage(new CommonClass.Message.GoAjaxPara() { msg = strMsg.ToString(), isReload = isReload, isError = IsError, msnLog = "", Data = null }); }
public void AjaxMethod() { Eastcom.BLL.月度考核内容 BLL_model_列表 = new Eastcom.BLL.月度考核内容(); Eastcom.Model.月度考核内容 model_列表 = null; StringBuilder strMsg = new StringBuilder(); int isReload = 0;//0:不刷新父页面 1:刷新父页面 bool IsError = false; switch (handleType) //this.PageType { case "See": #region 查看 //model_详细 = BLL_model_详细.GetModelByBH_YD(CommonClass.StringHander.Common.GetInt(FK_YDKHNR), CommonClass.StringHander.Common.GetInt(id)); model_列表 = BLL_model_列表.GetModelByUser(CurrentUserModel.UserID, CommonClass.StringHander.Common.GetDateTime(Request.Params["ddl_Year_Month"] ?? "")); if (model_列表 == null) { IsError = true; strMsg.Append(Request.Params["ddl_Year_Month"] + ",您没有考核模板"); } //strMsg.Append(this.CommonModel(model_详细)); if (strMsg.Length == 0) { strMsg.Append(Request.Params["ddl_Year_Month"]); //if (BLL_model_详细.Update(model_详细)) //{ // IsError = false; // strMsg.Append(""); // Get考核月份(); //} //else //{ // IsError = true; // strMsg.Append("更新失败"); //} } #endregion break; case "Change": #region 查看 model_列表 = BLL_model_列表.GetModelByUser(CurrentUserModel.UserID, CommonClass.StringHander.Common.GetDateTime(Request.Params["ddl_Year_Month"] ?? "")); if (model_列表 == null) { IsError = true; strMsg.Append(Request.Params["ddl_Year_Month"] + ",您没有考核模板"); } if (strMsg.Length == 0) { if (model_列表.提交情况 == Config.ConfigArgs.提交情况.已提交.ToString()) { strMsg.Append(model_列表.得分); } else { strMsg.Append(model_列表.提交情况); } } else { IsError = false; } #endregion break; default: strMsg.Append("页面操作类型不明确,操作失败!"); break; } CommonClass.Message.Log.WriteMessage(new CommonClass.Message.GoAjaxPara() { msg = strMsg.ToString(), isReload = isReload, isError = IsError, msnLog = "", Data = null }); }