Exemple #1
0
        /// <summary>
        /// 新增排产明细
        /// </summary>
        /// <param name="workDetail">排产明细</param>
        /// <param name="workModuleList">排产物料集合</param>
        /// <returns></returns>
        public Boolean save(work_detail workDetail, List <int> workModuleIdList)
        {
            workDetail.company = user.company;
            workDetail         = cd.save <work_detail>(workDetail);
            if (workDetail == null)
            {
                return(false);
            }

            //如果不是插单,填充row_num
            if (workDetail.is_insert == 0)
            {
                workDetail.row_num = workDetail.id + 1;
                if (!cd.update <work_detail>(workDetail))
                {
                    return(false);
                }
            }

            foreach (int workModuleId in workModuleIdList)
            {
                work_module workModule = new work_module();
                workModule.module_id = workModuleId;
                workModule.work_id   = workDetail.id;
                if (cd.save <work_module>(workModule) == null)
                {
                    return(false);
                }
            }
            return(true);
        }
Exemple #2
0
 /// <summary>
 /// 修改密码
 /// </summary>
 /// <param name="oldPwd">旧密码</param>
 /// <param name="newPwd">新密码</param>
 /// <returns>
 /// null 修改失败
 /// user_info.password == newPwd 修改成功
 /// user_info.password == oldPwd 密码错误
 /// </returns>
 public user_info updatePwd(string oldPwd, string newPwd)
 {
     if (user.password.Equals(oldPwd))
     {
         user.password = newPwd;
         return(cd.update <user_info>(user) ? user : null);
     }
     else
     {
         user.password = oldPwd;
         return(user);
     }
 }
 /// <summary>
 /// 修改
 /// </summary>
 /// <param name="moduleInfo"></param>
 /// <returns></returns>
 public Boolean update(module_info moduleInfo)
 {
     moduleInfo.company = user.company;
     return(cd.update <module_info>(moduleInfo));
 }
 /// <summary>
 /// 修改
 /// </summary>
 /// <param name="timeConfig"></param>
 /// <returns></returns>
 public Boolean update(time_config timeConfig)
 {
     return(cd.update <time_config>(checkTime(timeConfig)));
 }
Exemple #5
0
 /// <summary>
 /// 修改订单信息
 /// </summary>
 /// <param name="orderInfo"></param>
 /// <returns></returns>
 public Boolean update(order_info orderInfo)
 {
     orderInfo.company = user.company;
     return(cd.update <order_info>(orderInfo));
 }
Exemple #6
0
 /// <summary>
 /// 修改bom信息
 /// </summary>
 /// <param name="bomInfo"></param>
 /// <returns></returns>
 public Boolean update(bom_info bomInfo)
 {
     bomInfo.company = user.company;
     return(cd.update <bom_info>(bomInfo));
 }
 /// <summary>
 /// 修改模块类别
 /// </summary>
 /// <param name="moduleType"></param>
 /// <returns></returns>
 public Boolean update(module_type moduleType)
 {
     return(cd.update <module_type>(moduleType));
 }