void LoadDataBind() { string id = Request.QueryString["id"].ToString();//客户编号 string CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; DataTable dt = ServiceBus.PrintService(CompanyCD, id); if (dt != null) { rd.Load(Server.MapPath(@"~/PrinttingModel/CustManager/ServicePrint.rpt")); CrystalReportViewer1.LogOnInfo.Add(ReportUtil.GetTableLogOnInfo("officedba.CustLinkMan")); UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //绑定数据 rd.SetDataSource(dt); rd.Refresh(); this.CrystalReportViewer1.ReportSource = rd; rd.SetParameterValue("Today", "制表人:" + userInfo.EmployeeName); } }
/// <summary> /// 设置操作日志内容 /// </summary> /// <returns></returns> private static LogInfoModel InitLogInfo(string ApplyNo) { LogInfoModel logModel = new LogInfoModel(); //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 logModel.CompanyCD = userInfo.CompanyCD; //设置登陆用户ID logModel.UserID = userInfo.UserID; //设置模块ID 模块ID请在ConstUtil中定义,以便维护 logModel.ModuleID = ConstUtil.MODULE_ID_SUBSTOREMANAGER_SELLORDERADD; //设置操作日志类型 修改 logModel.ObjectName = ConstUtil.CODING_RULE_TABLE_SUBSTOREMANAGER_SUBSELLORDER; //操作对象 logModel.ObjectID = ApplyNo; //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空 logModel.Element = string.Empty; return(logModel); }
/// <summary> /// 设置操作日志内容 /// </summary> /// <returns></returns> private static LogInfoModel InitLogInfo(string RejectNo) { LogInfoModel logModel = new LogInfoModel(); //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 logModel.CompanyCD = userInfo.CompanyCD; //设置登陆用户ID logModel.UserID = userInfo.UserID; ////设置模块ID 模块ID请在ConstUtil中定义,以便维护 //logModel.ModuleID = ConstUtil.MODULE_ID_PurchaseReject_Add; //设置操作日志类型 修改 logModel.ObjectName = ConstUtil.CODING_RULE_TABLE_PURCHASEREJECT; //操作对象 logModel.ObjectID = RejectNo; //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空 logModel.Element = string.Empty; return(logModel); }
/// <summary> /// 设置操作日志内容 /// </summary> /// <returns></returns> private static LogInfoModel InitLogInfo(string InNo) { LogInfoModel logModel = new LogInfoModel(); //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 logModel.CompanyCD = userInfo.CompanyCD; //设置登陆用户ID logModel.UserID = userInfo.UserID; //设置模块ID 模块ID请在ConstUtil中定义,以便维护 logModel.ModuleID = ConstUtil.MODULE_ID_SUBDELIVERYBACK_SAVE; //设置操作日志类型 修改 logModel.ObjectName = "SubDeliveryBack"; //操作对象 logModel.ObjectID = InNo; //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空 logModel.Element = string.Empty; return(logModel); }
/// <summary> /// 设置操作日志内容 /// </summary> /// <returns></returns> private static LogInfoModel InitLogInfo(string ID) { LogInfoModel logModel = new LogInfoModel(); //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 logModel.CompanyCD = userInfo.CompanyCD; //设置登陆用户ID logModel.UserID = userInfo.UserID; //设置模块ID 模块ID请在ConstUtil中定义,以便维护 logModel.ModuleID = ConstUtil.MODULE_ID_STORAGE_STORAGEINFO; //设置操作日志类型 修改 logModel.ObjectName = "StorageInfo"; //操作对象 logModel.ObjectID = ID; //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空 logModel.Element = string.Empty; return(logModel); }
/// <summary> /// 设置操作日志内容 /// </summary> /// <returns></returns> private static LogInfoModel InitLogInfo(string prodno) { LogInfoModel logModel = new LogInfoModel(); //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 logModel.CompanyCD = userInfo.CompanyCD; //设置登陆用户ID logModel.UserID = userInfo.UserID; //设置模块ID 模块ID请在ConstUtil中定义,以便维护 logModel.ModuleID = ConstUtil.Menu_AddProduct; //设置操作日志类型 修改 logModel.ObjectName = ConstUtil.CODING_RULE_TABLE_PRODUCTINFO; //操作对象 logModel.ObjectID = prodno; //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空 logModel.Element = string.Empty; return(logModel); }
/// <summary> /// 删除文档分类 /// </summary> /// <param name="id"></param> /// <returns></returns> public static int DeleteCodeDocType(int id) { if (id == 0) { return(0); } UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; string CompanyCD = userInfo.CompanyCD; //string CompanyCD = "AAAAAA"; int isSucc = CategorySetDBHelper.DeleteCodeDocType(id); //定义变量 string remark; //成功时 if (isSucc > 0) { //设置操作成功标识 remark = ConstUtil.LOG_PROCESS_SUCCESS; } else { //设置操作成功标识 remark = ConstUtil.LOG_PROCESS_FAILED; } //获取删除的编号列表 //操作日志 LogInfoModel logModel = InitLogInfo(Convert.ToString(id)); //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空 logModel.Element = ConstUtil.LOG_PROCESS_DELETE; logModel.ModuleID = ConstUtil.Menu_DocTypeList; logModel.ObjectID = "文档分类ID:" + id; //设置操作日志类型 修改 logModel.ObjectName = ConstUtil.CODING_RULE_TABLE_DocType; //设置操作成功标识 logModel.Remark = remark; LogDBHelper.InsertLog(logModel); return(isSucc); }
/// <summary> /// 更新币种信息 /// </summary> /// <param name="Model"></param> /// <returns></returns> public static bool UpdateCurrTypeSetting(CurrencyTypeSettingModel Model) { UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; if (Model == null) { return(false); } if (Model.CompanyCD == null) { Model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; } try { bool succ = false; string loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID; LogInfoModel logModel = InitLogInfo(Model.ID.ToString()); logModel.Element = ConstUtil.LOG_PROCESS_UPDATE; succ = CurrTypeSettingDBHelper.UpdateCurrTypeSetting(Model); if (!succ) { logModel.Remark = ConstUtil.LOG_PROCESS_FAILED; } else { logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS; } LogDBHelper.InsertLog(logModel); return(succ); } catch (Exception ex) { WriteSystemLog(userInfo, ex); throw ex; } }
protected void btn_input_Click(object sender, EventArgs e) { try { userinfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; EmployeeInfoBus.GetExcelToEmployeeInfo(userinfo.CompanyCD); this.lbl_jg.Text = "Excel数据导入成功"; ProductInfoBus.LogInsert(userinfo.CompanyCD, userinfo.DeptID, userinfo.UserID, Request.QueryString["ModuleID"].ToString(), ds.Tables[0].Rows.Count, 1, "成功导入" + ds.Tables[0].Rows.Count.ToString() + "条数据"); /* * 更新有特殊符号的员工编号"##@@$$@@##" */ DataSet nullds = EmployeeInfoBus.GetNullEmployeeList(userinfo.CompanyCD); for (int i = 0; i < nullds.Tables[0].Rows.Count; i++) { //获取规则码 string employeeNo = XBase.Business.Common.ItemCodingRuleBus.GetCodeValue(ruleCode.ToString(), "EmployeeInfo", "EmployeeNo"); EmployeeInfoBus.UpdateEmployeeInfo(userinfo.CompanyCD, employeeNo, nullds.Tables[0].Rows[i]["ID"].ToString()); } /* * 更新结束 */ if (Session["newfile"] != null) { ProductInfoBus.DeleteFile(userinfo.CompanyCD, Session["newfile"].ToString()); } this.tab_end.Visible = true; btn_input.Enabled = false; } catch (Exception ex) { btn_input.Enabled = true; this.tab_end.Visible = true; this.lbl_jg.Text = ex.Message; ProductInfoBus.LogInsert(userinfo.CompanyCD, userinfo.DeptID, userinfo.UserID, Request.QueryString["ModuleID"].ToString(), 0, 0, this.lbl_jg.Text); } }
/// <summary> /// 设置操作日志内容 /// </summary> /// <returns></returns> private static LogInfoModel InitLogInfo(string ID) { LogInfoModel logModel = new LogInfoModel(); //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 logModel.CompanyCD = userInfo.CompanyCD; //设置登陆用户ID logModel.UserID = userInfo.UserID; //设置模块ID 模块ID请在ConstUtil中定义,以便维护 logModel.ModuleID = "2011701"; //设置操作日志类型 修改 logModel.ObjectName = "SalaryPerformanceRoyaltySet"; //操作对象 logModel.ObjectID = ID; //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空 logModel.Element = string.Empty; return(logModel); }
/// <summary> /// 界面加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { UserInfoUtil userInfo = SessionUtil.Session["UserInfo"] as UserInfoUtil; this.hidCompany.Value = userInfo.CompanyCD; if (!this.IsPostBack) {// 第一次加载 this.hidID.Value = Request["tableID"]; this.hidSearchCondition.Value = Request.QueryString.ToString(); DataTable dt = DefFormBus.GetDictionary(userInfo.CompanyCD); ListItem li = null; selDDLBinddic.Items.Add(""); foreach (DataRow dr in dt.Rows) { li = new ListItem(); selDDLBinddic.Items.Add(li); li.Text = dr["AliasTableName"].ToString(); li.Attributes.Add("title", dr["CustomTableName"].ToString()); li.Value = dr["ID"].ToString(); } } }
/// <summary> /// 编辑目标信息 /// </summary> /// <param name="model">目标信息</param> /// <returns></returns> public static int SaveAimInfo(AimInfoModel model) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 model.CompanyCD = userInfo.CompanyCD; //定义返回变量 int isSucc = -1; //ID存在时,更新 if (ConstUtil.EDIT_FLAG_UPDATE.Equals(model.EditFlag)) { try { //执行更新操作 isSucc = AimInfoDBHelper.UpdateAimInfo(model); } catch { //输出日志 } } //插入 else { try { //执行插入操作 isSucc = AimInfoDBHelper.InsertAimInfo(model); } catch { //输出日志 } } return(isSucc); }
/// <summary> /// 新增会计科目信息 /// </summary> /// <param name="Model">科目实体</param> /// <returns>True 成功,false失败</returns> public static bool InsertAccountSubjects(AccountSubjectsModel Model) { UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; if (Model == null) { return(false); } if (Model.CompanyCD == null) { Model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; } try { bool succ = false; string loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID; LogInfoModel logModel = InitLogInfo(Model.SubjectsCD); logModel.Element = ConstUtil.LOG_PROCESS_INSERT; succ = AccountSubjectsDBHelper.InsertAccountSubjects(Model); if (!succ) { logModel.Remark = ConstUtil.LOG_PROCESS_FAILED; } else { logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS; } LogDBHelper.InsertLog(logModel); return(succ); } catch (Exception ex) { WriteSystemLog(userInfo, ex); throw ex; } }
public static bool DeletePurchaseArriveAll(string DetailNo) { LogInfoModel logModel = InitLogInfo(DetailNo); logModel.Element = ConstUtil.LOG_PROCESS_DELETE; //设置模块ID 模块ID请在ConstUtil中定义,以便维护 logModel.ModuleID = ConstUtil.MODULE_ID_PurchaseArriveInfo; UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; string CompanyCD = userInfo.CompanyCD; //string[] sql = new string[2]; //int index = 0; //PurchaseArriveDBHelper.DeletePurchasePlanPrimary(ArriveNo, ref sql, index++); //PurchaseArriveDBHelper.DeletePurchasePlanDetail(ArriveNo, ref sql, index++); //SqlHelper.ExecuteTransForListWithSQL(sql); //bool isSucc = SqlHelper.Result.OprateCount > 0 ? true : false; bool isSucc = PurchaseArriveDBHelper.DeletePurchasePlanPrimary(DetailNo); string remark; //成功时 if (isSucc) { //设置操作成功标识 remark = ConstUtil.LOG_PROCESS_SUCCESS; logModel.Remark = remark; } else { //设置操作成功标识 remark = ConstUtil.LOG_PROCESS_FAILED; logModel.Remark = remark; } LogDBHelper.InsertLog(logModel); return(isSucc); }
/// <summary> /// 输出系统日志 /// </summary> /// <param name="userInfo">用户信息</param> /// <param name="ex">异常信息</param> private static void WriteSystemLog(UserInfoUtil userInfo, Exception ex) { /* * 出现异常时,输出系统日志到文本文件 * 考虑出现异常情况比较少,尽管一个方法可能多次异常, * 但还是考虑将异常日志的变量定义放在catch里面 */ //定义变量 LogInfo logSys = new LogInfo(); //设置日志类型 需要指定为系统日志 logSys.Type = LogInfo.LogType.SYSTEM; //指定系统日志类型 出错信息 logSys.SystemKind = LogInfo.SystemLogKind.SYSTEM_ERROR; //指定登陆用户信息 logSys.UserInfo = userInfo; //设定模块ID logSys.ModuleID = ConstUtil.MODULE_ID_CURRENCYTYOE_LIST; //描述 logSys.Description = ex.ToString(); //输出日志 LogUtil.WriteLog(logSys); }
protected void btnImport_Click(object sender, ImageClickEventArgs e) { PerformanceTaskModel searchModel = new PerformanceTaskModel(); searchModel.TaskFlag = Request.Form["selSearchTaskFlag"].ToString(); UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; searchModel.EditFlag = userInfo.EmployeeID.ToString(); searchModel.CompanyCD = userInfo.CompanyCD; //查询数据 DataTable dtData = PerformanceSummaryBus.SearchSurmmaryCheckInfo(searchModel); //导出标题 string headerTitle = "被考核人|任务主题|考核期间类型|考核期间|考核模板|考核总得分|累计扣分|累计加分|实际得分|考核等级|考核建议|总评人|总评时间|确认时间"; string[] header = headerTitle.Split('|'); //导出标题所对应的列字段名称 string columnFiled = "passEmployeeName|Title|TaskFlag|TaskNum|templateName|TotalScore|KillScore|AddScore|RealScore|LevelType|AdviceType|EvaluaterName|EvaluateDate|SignDate"; string[] field = columnFiled.Split('|'); XBase.Common.OutputToExecl.ExportToTable(this.Page, dtData, header, field, "员工确认"); }
protected void btn_input_Click(object sender, EventArgs e) { try { userinfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; StorageInfoBus.GetExcelToStorageInfo(userinfo.CompanyCD, userinfo.UserID, userinfo.IsBatch ? "1" : "0", userinfo.EmployeeID); this.lbl_jg.Text = "Excel数据导入成功"; if (Session["newfile"] != null) { ProductInfoBus.DeleteFile(userinfo.CompanyCD, Session["newfile"].ToString()); } ProductInfoBus.LogInsert(userinfo.CompanyCD, userinfo.DeptID, userinfo.UserID, Request.QueryString["ModuleID"].ToString(), ds.Tables[0].Rows.Count, 1, "成功导入" + ds.Tables[0].Rows.Count.ToString() + "条数据"); this.tab_end.Visible = true; btn_input.Enabled = false; } catch (Exception ex) { btn_input.Enabled = true; this.tab_end.Visible = true; this.lbl_jg.Text = ex.Message; ProductInfoBus.LogInsert(userinfo.CompanyCD, userinfo.DeptID, userinfo.UserID, Request.QueryString["ModuleID"].ToString(), 0, 0, this.lbl_jg.Text); } }
public static DataTable GetProductType() { try { string CompanyCD = ""; try { UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; CompanyCD = userInfo.CompanyCD; } catch { CompanyCD = "AAAAAA"; } return(CategorySetDBHelper.GetProductType(CompanyCD)); } catch { return(null); throw; } }
protected void btnImport_Click(object sender, ImageClickEventArgs e) { PerformanceScoreModel searchModel = new PerformanceScoreModel(); searchModel.TaskNo = txtSearchTask.Value.Trim(); //启用状态 searchModel.TaskTitle = inptSearchTitle.Value.Trim(); string selSearchTaskFlag = Request.Form["selSearchTaskFlag"].ToString(); if (selSearchTaskFlag != "0") { searchModel.TaskFlag = selSearchTaskFlag; } //启用状态 searchModel.EmployeeID = txtSearchScoreEmployee.Value; UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; searchModel.ScoreEmployee = userInfo.EmployeeID.ToString(); //查询数据 DataTable dtData = PerformanceGradeBus.SearchTaskInfo(searchModel); //导出标题 string headerTitle = "任务编号|任务主题|考核期间类型|考核模板|被考评人|任务创建人|任务创建日期"; string[] header = headerTitle.Split('|'); //导出标题所对应的列字段名称 string columnFiled = "TaskNo|TaskTitle|TaskFlag|TemplateName|EmployeeName|CreateEmployeeName|CreateDate"; string[] field = columnFiled.Split('|'); XBase.Common.OutputToExecl.ExportToTable(this.Page, dtData, header, field, "待评分列表"); }
/// <summary> /// 修改收款单信息 /// </summary> /// <param name="model">收款单实体</param> /// <returns>true 成功,false失败</returns> public static bool UpdateIncomeBill(IncomeBillModel model, decimal OldPrice) { if (model == null) { return(false); } model.ModifiedUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID; UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; try { bool succ = false; string loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID; LogInfoModel logModel = InitLogInfo(model.InComeNo, 0); logModel.Element = ConstUtil.LOG_PROCESS_UPDATE; succ = IncomeBillDBHelper.UpdateIncomeBill(model, OldPrice); if (!succ) { logModel.Remark = ConstUtil.LOG_PROCESS_FAILED; } else { logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS; } LogDBHelper.InsertLog(logModel); return(succ); } catch (Exception ex) { WriteSystemLog(userInfo, 0, ex); return(false); } }
public User GetCurrentUser() { CheckIfUserChanged(); if (_currentUser == null) { _currentUser = _sessionHelper.Retrieve(SessionIdxEnum.CurrentUserEntity) as User; if (_currentUser == null) { string localId = UserInfoUtil.GetLocalId(); if (localId != null) { var userTmp = _uow.Users.GetAll() .Where(u => u.LocalAuthUserId == localId) .Include(u => u.Profile) .Include(u => u.AsUserDependents.Select(d => d.Child.Profile)) .Include(u => u.AsChildDependsOn.Select(p => p.User.Profile)) .FirstOrDefault(); if (userTmp != null) { userTmp.MapToNew <User, User>(out _currentUser); _uow.Users.Detach(userTmp); } } else { CreateDefaultUser(); } _sessionHelper.Store(SessionIdxEnum.CurrentUserEntity, _currentUser); } else { _currentUserModel = MappingUtil.Map <User, UserModel>(_currentUser); } } return(_currentUser); }
/// <summary> /// 输出系统日志 /// </summary> /// <param name="userInfo">用户信息</param> /// <param name="ex">异常信息</param> private static void WriteSystemLog(UserInfoUtil userInfo, Exception ex, string TableName) { /* * 出现异常时,输出系统日志到文本文件 * 考虑出现异常情况比较少,尽管一个方法可能多次异常, * 但还是考虑将异常日志的变量定义放在catch里面 */ //定义变量 LogInfo logSys = new LogInfo(); //设置日志类型 需要指定为系统日志 logSys.Type = LogInfo.LogType.SYSTEM; //指定系统日志类型 出错信息 logSys.SystemKind = LogInfo.SystemLogKind.SYSTEM_ERROR; //指定登陆用户信息 logSys.UserInfo = userInfo; //设定模块ID switch (TableName) { case "officedba.CodeReasonType": logSys.ModuleID = ConstUtil.Menu_CodeReasonType; break; case "officedba.CodeFeeType": logSys.ModuleID = ConstUtil.Menu_CodeFeeType; break; case "officedba.CodeUnitType": logSys.ModuleID = ConstUtil.Menu_CodeUnitType; break; } //描述 logSys.Description = ex.ToString(); //输出日志 LogUtil.WriteLog(logSys); }
/// <summary> /// 内部转账单登记凭证状态 /// </summary> /// <param name="ids"></param> /// <returns></returns> public static bool AccountInSideChangeAcco(string ids, int AttestBillID) { UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; try { bool suuc = InSideChangeAccoDBHelper.AccountInSideChangeAcco(ids, AttestBillID); string[] idsStr = ids.Split(','); for (int i = 0; i < idsStr.Length; i++) { string loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID; LogInfoModel logModel = InitLogInfo(idsStr[i].ToString()); logModel.ModuleID = ConstUtil.MODULE_ID_INSIDECHANGEACCO_LIST; logModel.Element = ConstUtil.LOG_PROCESS_ACCOUNT; logModel.ObjectName = ConstUtil.CODING_RULE_TABLE_INSIDECHANGEACCO; if (suuc) { logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS; } else { logModel.Remark = ConstUtil.LOG_PROCESS_FAILED; } LogDBHelper.InsertLog(logModel); } return(suuc); } catch (Exception ex) { WriteSystemLog(userInfo, ex); throw ex; } }
protected void BindInfo() { UserInfoUtil UserInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; /*接受参数*/ int ID = Convert.ToInt32(Request.QueryString["ID"].ToString()); string ReprotNo = Request.QueryString["ReportNo"].ToString(); string CompanyCD = UserInfo.CompanyCD; /*读取数据*/ DataTable dtDetail = new DataTable(); DataTable dt = XBase.Business.Office.StorageManager.CheckReportBus.GetReportInfo(ID); dtDetail = XBase.Business.Office.StorageManager.CheckReportBus.GetDetailInfo(ID); /*绑定RPT*/ if (dt != null) { /*加载主报表*/ this.CrystalReportSource1.ReportDocument.Load(Server.MapPath(@"~/PrinttingModel/StorageManager/StorageCheckReport.rpt")); CrystalReportViewer1.LogOnInfo.Add(ReportUtil.GetTableLogOnInfo("officedba.QualityCheckReport")); /*加载子报表*/ ReportDocument rdDetail = new ReportDocument(); if (dtDetail.Rows.Count > 0) { rdDetail = CrystalReportSource1.ReportDocument.Subreports["StorageCheckReportDetail.rpt"]; rdDetail.SetDataSource(dtDetail); } //绑定数据 CrystalReportSource1.ReportDocument.SetDataSource(dt); CrystalReportSource1.DataBind(); UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; this.CrystalReportSource1.ReportDocument.SetParameterValue("Creator", userInfo.UserName); this.CrystalReportViewer1.ReportSource = CrystalReportSource1; } }
/// <summary> /// 添加收款单信息 /// </summary> /// <param name="model">收款单实体</param> /// <returns>true 成功,false失败</returns> public static bool InsertIncomeBill(IncomeBillModel model, out int ID) { ID = 0; UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; model.ModifiedUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID; try { bool succ = false; string loginUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID; LogInfoModel logModel = InitLogInfo(model.InComeNo, 0); logModel.Element = ConstUtil.LOG_PROCESS_UPDATE; succ = IncomeBillDBHelper.InsertIncomeBill(model, out ID); if (!succ) { logModel.Remark = ConstUtil.LOG_PROCESS_FAILED; } else { logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS; } LogDBHelper.InsertLog(logModel); return(succ); } catch (Exception ex) { WriteSystemLog(userInfo, 0, ex); return(false); } }
public static bool DeleteProviderInfoAll(string CustNo, string CompanyCD) { LogInfoModel logModel = InitLogInfo(CustNo); logModel.Element = ConstUtil.LOG_PROCESS_DELETE; //设置模块ID 模块ID请在ConstUtil中定义,以便维护 logModel.ModuleID = ConstUtil.MODULE_ID_PROVIDERINFOINFO; UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //string[] sql = new string[3]; //int index = 0; SqlCommand[] cmdList = new SqlCommand[3]; cmdList [0] = ProviderInfoDBHelper.DeleteProviderInfo(CustNo, CompanyCD); //供应商信息 cmdList[1] = ProviderInfoDBHelper.DeleteProviderLinkMan(CustNo, CompanyCD); //供应商联系人 cmdList[2] = ProviderInfoDBHelper.DeleteProviderProduct(CustNo, CompanyCD); //供应商产品 SqlHelper.ExecuteTransForList(cmdList); bool isSucc = SqlHelper.Result.OprateCount > 0 ? true : false; string remark; //成功时 if (isSucc) { //设置操作成功标识 remark = ConstUtil.LOG_PROCESS_SUCCESS; logModel.Remark = remark; } else { //设置操作成功标识 remark = ConstUtil.LOG_PROCESS_FAILED; logModel.Remark = remark; } LogDBHelper.InsertLog(logModel); return(isSucc); }
/*绑定主表信息*/ protected void BindMainInfo() { /*接受参数*/ string OrderNo = Request.QueryString["no"].ToString(); /*读取数据*/ DataTable dt = SellPlanBus.GetRepOrder(OrderNo); dt1.Columns.Add("PlanNo"); DataRow dr = dt1.NewRow(); dr[0] = "销售计划明细:"; dt1.Rows.Add(dr); LoadDetailQuarter(); /*绑定RPT*/ if (dt != null) { /*加载主报表*/ rd.Load(Server.MapPath(@"~/PrinttingModel/SellManager/SellPlan.rpt")); crViewer.LogOnInfo.Add(ReportUtil.GetTableLogOnInfo("officedba.SellPlan")); /*加载子报表*/ ReportDocument rdDetail = rd.Subreports["SellPlanDetail.rpt"]; rdDetail.SetDataSource(dt1); //绑定数据 rd.SetDataSource(dt); rd.Refresh(); this.crViewer.ReportSource = rd; UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; rd.SetParameterValue("PrintName", "制表人:" + userInfo.UserName); } }
/// <summary> /// 确认调职信息 /// </summary> /// <param name="model">调职信息</param> /// <returns></returns> public static bool ConfirmEmplApplyNotifyInfo(EmplApplyNotifyModel model) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 model.CompanyCD = userInfo.CompanyCD; model.ModifiedUserID = userInfo.UserID; //定义返回变量 bool isSucc = false; //操作日志 LogInfoModel logModel = InitLogInfo(model.NotifyNo); //更新操作 logModel.Element = ConstUtil.LOG_PROCESS_UPDATE; isSucc = EmplApplyNotifyDBHelper.ConfirmEmplApplyNotifyInfo(model); //更新成功时 if (isSucc) { //设置操作成功标识 logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS; } //更新不成功 else { //设置操作成功标识 logModel.Remark = ConstUtil.LOG_PROCESS_FAILED; } //登陆日志 LogDBHelper.InsertLog(logModel); return(isSucc); }
/*绑定主表信息*/ protected void BindMainInfo() { /*接受参数*/ string OrderNo = Request.QueryString["no"].ToString(); /*读取数据*/ DataTable dt = EmployeeContractBus.GetRepOrder(OrderNo); /*绑定RPT*/ if (dt != null) { /*加载主报表*/ rd.Load(Server.MapPath(@"~/PrinttingModel/HumanManager/EmployeeContract.rpt")); crViewer.LogOnInfo.Add(ReportUtil.GetTableLogOnInfo("officedba.HumanManager_report_EmployeeContract")); UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //绑定数据 rd.SetDataSource(dt); rd.Refresh(); this.crViewer.ReportSource = rd; rd.SetParameterValue("Today", "制表人:" + userInfo.EmployeeName); } }
/// <summary> /// 删除机构岗位信息 /// </summary> /// <param name="quarterID">组织机构ID</param> /// <returns></returns> public static bool DeleteDeptQuarterInfo(string quarterID) { UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //设置公司代码 string CompanyCD = userInfo.CompanyCD; //执行删除操作 bool isSucc = DeptQuarterDBHelper.DeleteQuarterInfo(quarterID, CompanyCD); //定义变量 string remark; //成功时 if (isSucc) { //设置操作成功标识 remark = ConstUtil.LOG_PROCESS_SUCCESS; } else { //设置操作成功标识 remark = ConstUtil.LOG_PROCESS_FAILED; } //操作日志 LogInfoModel logModel = InitLogInfo(quarterID); //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空 logModel.Element = ConstUtil.LOG_PROCESS_DELETE; //设置操作成功标识 logModel.Remark = remark; //登陆日志 LogDBHelper.InsertLog(logModel); return(isSucc); }