/// <summary> /// 查询计时工资单价 /// </summary> /// <param name="itemNo">工资项编号</param> /// <returns></returns> public static DataTable GetTimeItemPrice(string itemNo) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //执行查询 return(TimeItemDBHelper.GetTimeItemPrice(userInfo.CompanyCD, itemNo)); }
public static bool IsUsedItem(string itemNo) { //获取登陆用户信息 string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; //进行校验 return(TimeItemDBHelper.IsUsedItem(itemNo, companyCD)); }
/// <summary> /// 查询计时工资项信息 /// </summary> /// <param name="isUsed">启用状态</param> /// <returns></returns> public static DataTable GetTimeItemInfo(bool isUsed) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //执行查询 return(TimeItemDBHelper.SearchTimeItemInfo(userInfo.CompanyCD, isUsed)); }
/// <summary> /// 编辑计时工资项信息 /// </summary> /// <param name="lstEdit">计时工资项信息</param> /// <returns></returns> public static bool SaveTimeItemInfo(ArrayList lstEdit) { //定义返回变量 bool isSucc = true; //信息存在时,进行操作 if (lstEdit != null && lstEdit.Count > 0) { //获取登陆用户信息 UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; //执行保存操作 try { //执行保存操作 isSucc = TimeItemDBHelper.SaveTimeItemInfo(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); }