public static bool DeletePerTypeInfo(string elemID) { UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //获取公司代码 string companyCD = userInfo.CompanyCD; //执行删除操作 bool isSucc = PieceworkItemDBHelper.DeletePerTypeInfo(elemID, companyCD); //定义变量 string remark; //成功时 if (isSucc) { //设置操作成功标识 remark = ConstUtil.LOG_PROCESS_SUCCESS; } else { //设置操作成功标识 remark = ConstUtil.LOG_PROCESS_FAILED; } //操作日志 LogInfoModel logModel = InitLogInfo(elemID); //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空 logModel.Element = ConstUtil.LOG_PROCESS_DELETE; //设置操作成功标识 logModel.Remark = remark; //登陆日志 LogDBHelper.InsertLog(logModel); return(isSucc); }
/// <summary> /// 查询公司是否有生产模块 /// </summary> /// <returns></returns> public static bool IsHaveProductionInfo() { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //执行查询 return(PieceworkItemDBHelper.IsHaveProductionInfo(userInfo.CompanyCD)); }
public static bool IsCommissionItemUsedItem(string itemNo) { //获取登陆用户信息 string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; //进行校验 return(PieceworkItemDBHelper.IsCommissionItemUsedItem(itemNo, companyCD)); }
/// <summary> /// 查询计件工资单价 /// </summary> /// <param name="itemNo">工资项编号</param> /// <returns></returns> public static DataTable GetPieceworkPrice(string itemNo) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //执行查询 return(PieceworkItemDBHelper.GetPieceworkPrice(userInfo.CompanyCD, itemNo)); }
/// <summary> /// 查询计件工资项信息 /// </summary> /// <param name="isUsed">启用状态</param> /// <returns></returns> public static DataTable GetPieceworkItemInfo(bool isUsed) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //执行查询 return(PieceworkItemDBHelper.SearchPieceworkItemInfo(userInfo.CompanyCD, isUsed)); }
/// <summary> /// 编辑计件工资项信息 /// </summary> /// <param name="lstEdit">计件工资项信息</param> /// <returns></returns> public static bool SavePieceworkItemInfo(ArrayList lstEdit) { //定义返回变量 bool isSucc = true; //信息存在时,进行操作 if (lstEdit != null && lstEdit.Count > 0) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //执行保存操作 try { //执行保存操作 isSucc = PieceworkItemDBHelper.SavePieceworkItemInfo(lstEdit, userInfo.CompanyCD, userInfo.UserID); } catch (Exception ex) { //输出系统日志 WriteSystemLog(userInfo, ex); } //操作日志 LogInfoModel logModel = InitLogInfo(userInfo.CompanyCD); //设置关键元素 logModel.Element = ConstUtil.LOG_PROCESS_UPDATE; //更新成功时 if (isSucc) { //设置操作成功标识 logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS; } //更新不成功 else { //设置操作成功标识 logModel.Remark = ConstUtil.LOG_PROCESS_FAILED; } //登陆日志 LogDBHelper.InsertLog(logModel); } return(isSucc); }