You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1606 lines
61 KiB
1606 lines
61 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data.Entity.Migrations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using CK.SCP.Models;
|
|
using CK.SCP.Models.Enums;
|
|
using CK.SCP.Models.ScpEntity;
|
|
using CK.SCP.Utils;
|
|
using System.Data.Entity.Core;
|
|
using System.Web;
|
|
using CK.SCP.Models.UniApiEntity;
|
|
|
|
namespace CK.SCP.Controller
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
public class SCP_INTERFACE_CONTROLLER
|
|
{
|
|
|
|
public static ResultObject<List<xxqad_pt_mstr>> Get_xxqad_pt_mstr_List(xxqad_pt_mstr p_entity)
|
|
{
|
|
ResultObject<List<xxqad_pt_mstr>> _ret = new ResultObject<List<xxqad_pt_mstr>>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
IQueryable<xxqad_pt_mstr> q = db.xxqad_pt_mstr;
|
|
if (p_entity.xxqad_pt_uid != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_uid == p_entity.xxqad_pt_uid);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_seq))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_seq.Contains(p_entity.xxqad_pt_seq));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_part))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_part.Contains(p_entity.xxqad_pt_part));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_domain))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_domain.Contains(p_entity.xxqad_pt_domain));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_site))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_site.Contains(p_entity.xxqad_pt_site));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_um))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_um.Contains(p_entity.xxqad_pt_um));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_desc1))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_desc1.Contains(p_entity.xxqad_pt_desc1));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_desc2))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_desc2.Contains(p_entity.xxqad_pt_desc2));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_dsgn_grp))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_dsgn_grp.Contains(p_entity.xxqad_pt_dsgn_grp));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_promo))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_promo.Contains(p_entity.xxqad_pt_promo));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_part_type))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_part_type.Contains(p_entity.xxqad_pt_part_type));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_group))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_group.Contains(p_entity.xxqad_pt_group));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_prod_line))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_prod_line.Contains(p_entity.xxqad_pt_prod_line));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_status))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_status.Contains(p_entity.xxqad_pt_status));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_qadread))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_qadread.Contains(p_entity.xxqad_pt_qadread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_wmsread))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_wmsread.Contains(p_entity.xxqad_pt_wmsread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_scmread))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_scmread.Contains(p_entity.xxqad_pt_scmread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_mesread))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_mesread.Contains(p_entity.xxqad_pt_mesread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_rmks))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_rmks.Contains(p_entity.xxqad_pt_rmks));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_createur))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_createur.Contains(p_entity.xxqad_pt_createur));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pt_updateur))
|
|
{
|
|
q = q.Where(p => p.xxqad_pt_updateur.Contains(p_entity.xxqad_pt_updateur));
|
|
}
|
|
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = q.ToList();
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_pt_mstr), "Get_xxqad_pt_mstr_List", e.Message);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
public ResultObject<bool> Save_xxqad_pt_mstr(List<xxqad_pt_mstr> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxqad_pt_mstr.AddOrUpdate(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_pt_mstr), "Save_xxqad_pt_mstr", e.Message);
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
public ResultObject<bool> Del_xxqad_pt_mstr(List<xxqad_pt_mstr> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxqad_pt_mstr.Remove(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_pt_mstr), "Del_xxqad_pt_mstr", e.Message); throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static ResultObject<List<xxqad_vd_mstr>> Get_xxqad_vd_mstr_List(xxqad_vd_mstr p_entity)
|
|
{
|
|
ResultObject<List<xxqad_vd_mstr>> _ret = new ResultObject<List<xxqad_vd_mstr>>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
IQueryable<xxqad_vd_mstr> q = db.xxqad_vd_mstr;
|
|
if (p_entity.xxqad_vd_uid != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_uid == p_entity.xxqad_vd_uid);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_seq))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_seq.Contains(p_entity.xxqad_vd_seq));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_addr))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_addr.Contains(p_entity.xxqad_vd_addr));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_domain))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_domain.Contains(p_entity.xxqad_vd_domain));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_name))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_name.Contains(p_entity.xxqad_vd_name));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_line1))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_line1.Contains(p_entity.xxqad_vd_line1));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_line2))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_line2.Contains(p_entity.xxqad_vd_line2));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_line3))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_line3.Contains(p_entity.xxqad_vd_line3));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_country))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_country.Contains(p_entity.xxqad_vd_country));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_city))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_city.Contains(p_entity.xxqad_vd_city));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_phone))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_phone.Contains(p_entity.xxqad_vd_phone));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_fax))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_fax.Contains(p_entity.xxqad_vd_fax));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_pst_id))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_pst_id.Contains(p_entity.xxqad_vd_pst_id));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_attn))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_attn.Contains(p_entity.xxqad_vd_attn));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_curr))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_curr.Contains(p_entity.xxqad_vd_curr));
|
|
}
|
|
if (p_entity.xxqad_vd_tax != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_tax == p_entity.xxqad_vd_tax);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_promo))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_promo.Contains(p_entity.xxqad_vd_promo));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_type))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_type.Contains(p_entity.xxqad_vd_type));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_qadread))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_qadread.Contains(p_entity.xxqad_vd_qadread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_wmsread))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_wmsread.Contains(p_entity.xxqad_vd_wmsread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_scmread))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_scmread.Contains(p_entity.xxqad_vd_scmread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_mesread))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_mesread.Contains(p_entity.xxqad_vd_mesread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_rmks))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_rmks.Contains(p_entity.xxqad_vd_rmks));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_createur))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_createur.Contains(p_entity.xxqad_vd_createur));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vd_updateur))
|
|
{
|
|
q = q.Where(p => p.xxqad_vd_updateur.Contains(p_entity.xxqad_vd_updateur));
|
|
}
|
|
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = q.ToList();
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_vd_mstr), "Get_xxqad_vd_mstr_List", e.Message);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
public ResultObject<bool> Save_xxqad_vd_mstr(List<xxqad_vd_mstr> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxqad_vd_mstr.AddOrUpdate(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_vd_mstr), "Save_xxqad_vd_mstr", e.Message);
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
public ResultObject<bool> Del_xxqad_vd_mstr(List<xxqad_vd_mstr> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxqad_vd_mstr.Remove(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_vd_mstr), "Del_xxqad_vd_mstr", e.Message); throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static ResultObject<List<xxqad_vp_mstr>> Get_xxqad_vp_mstr_List(xxqad_vp_mstr p_entity)
|
|
{
|
|
ResultObject<List<xxqad_vp_mstr>> _ret = new ResultObject<List<xxqad_vp_mstr>>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
IQueryable<xxqad_vp_mstr> q = db.xxqad_vp_mstr;
|
|
if (p_entity.xxqad_vp_uid != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_uid == p_entity.xxqad_vp_uid);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_seq))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_seq.Contains(p_entity.xxqad_vp_seq));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_addr))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_addr.Contains(p_entity.xxqad_vp_addr));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_part))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_part.Contains(p_entity.xxqad_vp_part));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_domain))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_domain.Contains(p_entity.xxqad_vp_domain));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_vend_part))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_vend_part.Contains(p_entity.xxqad_vp_vend_part));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_site))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_site.Contains(p_entity.xxqad_vp_site));
|
|
}
|
|
if (p_entity.xxqad_vp_comment != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_comment == p_entity.xxqad_vp_comment);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_qadread))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_qadread.Contains(p_entity.xxqad_vp_qadread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_wmsread))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_wmsread.Contains(p_entity.xxqad_vp_wmsread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_scmread))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_scmread.Contains(p_entity.xxqad_vp_scmread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_mesread))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_mesread.Contains(p_entity.xxqad_vp_mesread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_rmks))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_rmks.Contains(p_entity.xxqad_vp_rmks));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_createur))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_createur.Contains(p_entity.xxqad_vp_createur));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_vp_updateur))
|
|
{
|
|
q = q.Where(p => p.xxqad_vp_updateur.Contains(p_entity.xxqad_vp_updateur));
|
|
}
|
|
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = q.ToList();
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_vp_mstr), "Get_xxqad_vp_mstr_List", e.Message);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
public ResultObject<bool> Save_xxqad_vp_mstr(List<xxqad_vp_mstr> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxqad_vp_mstr.AddOrUpdate(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_vp_mstr), "Save_xxqad_vp_mstr", e.Message);
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
public ResultObject<bool> Del_xxqad_vp_mstr(List<xxqad_vp_mstr> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxqad_vp_mstr.Remove(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_vp_mstr), "Del_xxqad_vp_mstr", e.Message); throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static ResultObject<List<xxqad_pod_det>> Get_xxqad_pod_det_List(xxqad_pod_det p_entity)
|
|
{
|
|
ResultObject<List<xxqad_pod_det>> _ret = new ResultObject<List<xxqad_pod_det>>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
IQueryable<xxqad_pod_det> q = db.xxqad_pod_det;
|
|
if (p_entity.xxqad_pod_uid != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_uid == p_entity.xxqad_pod_uid);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_seq))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_seq.Contains(p_entity.xxqad_pod_seq));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_nbr))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_nbr.Contains(p_entity.xxqad_pod_nbr));
|
|
}
|
|
if (p_entity.xxqad_pod_line != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_line == p_entity.xxqad_pod_line);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_modtype))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_modtype.Contains(p_entity.xxqad_pod_modtype));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_site))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_site.Contains(p_entity.xxqad_pod_site));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_domain))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_domain.Contains(p_entity.xxqad_pod_domain));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_part))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_part.Contains(p_entity.xxqad_pod_part));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_desc))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_desc.Contains(p_entity.xxqad_pod_desc));
|
|
}
|
|
if (p_entity.xxqad_pod_qty_ord != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_qty_ord == p_entity.xxqad_pod_qty_ord);
|
|
}
|
|
if (p_entity.xxqad_pod_qty_rct != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_qty_rct == p_entity.xxqad_pod_qty_rct);
|
|
}
|
|
if (p_entity.xxqad_pod_qty_std != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_qty_std == p_entity.xxqad_pod_qty_std);
|
|
}
|
|
if (p_entity.xxqad_pod_price != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_price == p_entity.xxqad_pod_price);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_curr))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_curr.Contains(p_entity.xxqad_pod_curr));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_loc_um))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_loc_um.Contains(p_entity.xxqad_pod_loc_um));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_um))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_um.Contains(p_entity.xxqad_pod_um));
|
|
}
|
|
if (p_entity.xxqad_pod_um_conv != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_um_conv == p_entity.xxqad_pod_um_conv);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_vend))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_vend.Contains(p_entity.xxqad_pod_vend));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_name))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_name.Contains(p_entity.xxqad_pod_name));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_attn))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_attn.Contains(p_entity.xxqad_pod_attn));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_ship))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_ship.Contains(p_entity.xxqad_pod_ship));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_made))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_made.Contains(p_entity.xxqad_pod_made));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_buyer))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_buyer.Contains(p_entity.xxqad_pod_buyer));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_buyer_phone))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_buyer_phone.Contains(p_entity.xxqad_pod_buyer_phone));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_status))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_status.Contains(p_entity.xxqad_pod_status));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_qadread))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_qadread.Contains(p_entity.xxqad_pod_qadread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_wmsread))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_wmsread.Contains(p_entity.xxqad_pod_wmsread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_scmread))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_scmread.Contains(p_entity.xxqad_pod_scmread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_mesread))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_mesread.Contains(p_entity.xxqad_pod_mesread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_rmks))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_rmks.Contains(p_entity.xxqad_pod_rmks));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_createur))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_createur.Contains(p_entity.xxqad_pod_createur));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_pod_updateur))
|
|
{
|
|
q = q.Where(p => p.xxqad_pod_updateur.Contains(p_entity.xxqad_pod_updateur));
|
|
}
|
|
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = q.ToList();
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_pod_det), "Get_xxqad_pod_det_List", e.Message);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
public ResultObject<bool> Save_xxqad_pod_det(List<xxqad_pod_det> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxqad_pod_det.AddOrUpdate(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_pod_det), "Save_xxqad_pod_det", e.Message);
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
public ResultObject<bool> Del_xxqad_pod_det(List<xxqad_pod_det> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxqad_pod_det.Remove(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_pod_det), "Del_xxqad_pod_det", e.Message); throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static ResultObject<List<xxwms_rc_det>> Get_xxwms_rc_det_List(xxwms_rc_det p_entity)
|
|
{
|
|
ResultObject<List<xxwms_rc_det>> _ret = new ResultObject<List<xxwms_rc_det>>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
IQueryable<xxwms_rc_det> q = db.xxwms_rc_det;
|
|
if (p_entity.xxwms_rc_uid != 0)
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_uid == p_entity.xxwms_rc_uid);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_seq))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_seq.Contains(p_entity.xxwms_rc_seq));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_nbr))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_nbr.Contains(p_entity.xxwms_rc_nbr));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_ps_nbr))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_ps_nbr.Contains(p_entity.xxwms_rc_ps_nbr));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_po_nbr))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_po_nbr.Contains(p_entity.xxwms_rc_po_nbr));
|
|
}
|
|
if (p_entity.xxwms_rc_po_line != 0)
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_po_line == p_entity.xxwms_rc_po_line);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_part))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_part.Contains(p_entity.xxwms_rc_part));
|
|
}
|
|
if (p_entity.xxwms_rc_qty_total != 0)
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_qty_total == p_entity.xxwms_rc_qty_total);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_site))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_site.Contains(p_entity.xxwms_rc_site));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_vend))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_vend.Contains(p_entity.xxwms_rc_vend));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_ware_class))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_ware_class.Contains(p_entity.xxwms_rc_ware_class));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_ware))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_ware.Contains(p_entity.xxwms_rc_ware));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_loc))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_loc.Contains(p_entity.xxwms_rc_loc));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_po_um))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_po_um.Contains(p_entity.xxwms_rc_po_um));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_loc_um))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_loc_um.Contains(p_entity.xxwms_rc_loc_um));
|
|
}
|
|
if (p_entity.xxwms_rc_conv != 0)
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_conv == p_entity.xxwms_rc_conv);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_lot))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_lot.Contains(p_entity.xxwms_rc_lot));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_vend_batch))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_vend_batch.Contains(p_entity.xxwms_rc_vend_batch));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_qadread))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_qadread.Contains(p_entity.xxwms_rc_qadread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_wmsread))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_wmsread.Contains(p_entity.xxwms_rc_wmsread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_scmread))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_scmread.Contains(p_entity.xxwms_rc_scmread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_mesread))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_mesread.Contains(p_entity.xxwms_rc_mesread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_rmks))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_rmks.Contains(p_entity.xxwms_rc_rmks));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_createur))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_createur.Contains(p_entity.xxwms_rc_createur));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_updateur))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_updateur.Contains(p_entity.xxwms_rc_updateur));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rc_domain))
|
|
{
|
|
q = q.Where(p => p.xxwms_rc_domain.Contains(p_entity.xxwms_rc_domain));
|
|
}
|
|
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = q.ToList();
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxwms_rc_det), "Get_xxwms_rc_det_List", e.Message);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
public ResultObject<bool> Save_xxwms_rc_det(List<xxwms_rc_det> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxwms_rc_det.AddOrUpdate(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxwms_rc_det), "Save_xxwms_rc_det", e.Message);
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
public ResultObject<bool> Del_xxwms_rc_det(List<xxwms_rc_det> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxwms_rc_det.Remove(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxwms_rc_det), "Del_xxwms_rc_det", e.Message); throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static ResultObject<List<xxwms_rt_det>> Get_xxwms_rt_det_List(xxwms_rt_det p_entity)
|
|
{
|
|
ResultObject<List<xxwms_rt_det>> _ret = new ResultObject<List<xxwms_rt_det>>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
IQueryable<xxwms_rt_det> q = db.xxwms_rt_det;
|
|
if (p_entity.xxwms_rt_uid != 0)
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_uid == p_entity.xxwms_rt_uid);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_seq))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_seq.Contains(p_entity.xxwms_rt_seq));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_nbr))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_nbr.Contains(p_entity.xxwms_rt_nbr));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_po_nbr))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_po_nbr.Contains(p_entity.xxwms_rt_po_nbr));
|
|
}
|
|
if (p_entity.xxwms_rt_po_line != 0)
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_po_line == p_entity.xxwms_rt_po_line);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_part))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_part.Contains(p_entity.xxwms_rt_part));
|
|
}
|
|
if (p_entity.xxwms_rt_qty_total != 0)
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_qty_total == p_entity.xxwms_rt_qty_total);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_site))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_site.Contains(p_entity.xxwms_rt_site));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_vend))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_vend.Contains(p_entity.xxwms_rt_vend));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_ware_class))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_ware_class.Contains(p_entity.xxwms_rt_ware_class));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_ware))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_ware.Contains(p_entity.xxwms_rt_ware));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_loc))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_loc.Contains(p_entity.xxwms_rt_loc));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_po_um))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_po_um.Contains(p_entity.xxwms_rt_po_um));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_loc_um))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_loc_um.Contains(p_entity.xxwms_rt_loc_um));
|
|
}
|
|
if (p_entity.xxwms_rt_conv != 0)
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_conv == p_entity.xxwms_rt_conv);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_lot))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_lot.Contains(p_entity.xxwms_rt_lot));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_vend_batch))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_vend_batch.Contains(p_entity.xxwms_rt_vend_batch));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_qadread))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_qadread.Contains(p_entity.xxwms_rt_qadread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_wmsread))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_wmsread.Contains(p_entity.xxwms_rt_wmsread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_scmread))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_scmread.Contains(p_entity.xxwms_rt_scmread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_mesread))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_mesread.Contains(p_entity.xxwms_rt_mesread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_rmks))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_rmks.Contains(p_entity.xxwms_rt_rmks));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_createur))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_createur.Contains(p_entity.xxwms_rt_createur));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_updateur))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_updateur.Contains(p_entity.xxwms_rt_updateur));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxwms_rt_domain))
|
|
{
|
|
q = q.Where(p => p.xxwms_rt_domain.Contains(p_entity.xxwms_rt_domain));
|
|
}
|
|
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = q.ToList();
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxwms_rt_det), "Get_xxwms_rt_det_List", e.Message);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
public ResultObject<bool> Save_xxwms_rt_det(List<xxwms_rt_det> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxwms_rt_det.AddOrUpdate(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxwms_rt_det), "Save_xxwms_rt_det", e.Message);
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
public ResultObject<bool> Del_xxwms_rt_det(List<xxwms_rt_det> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxwms_rt_det.Remove(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxwms_rt_det), "Del_xxwms_rt_det", e.Message); throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static ResultObject<List<xxscm_inv_det>> Get_xxscm_inv_det_List(xxscm_inv_det p_entity)
|
|
{
|
|
ResultObject<List<xxscm_inv_det>> _ret = new ResultObject<List<xxscm_inv_det>>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
IQueryable<xxscm_inv_det> q = db.xxscm_inv_det;
|
|
if (p_entity.xxscm_inv_uid != 0)
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_uid == p_entity.xxscm_inv_uid);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_seq))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_seq.Contains(p_entity.xxscm_inv_seq));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_domain))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_domain.Contains(p_entity.xxscm_inv_domain));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_site))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_site.Contains(p_entity.xxscm_inv_site));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_nbr))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_nbr.Contains(p_entity.xxscm_inv_nbr));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_vend))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_vend.Contains(p_entity.xxscm_inv_vend));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_invoice))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_invoice.Contains(p_entity.xxscm_inv_invoice));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_curr))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_curr.Contains(p_entity.xxscm_inv_curr));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_order))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_order.Contains(p_entity.xxscm_inv_order));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_line))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_line.Contains(p_entity.xxscm_inv_line));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_receiver))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_receiver.Contains(p_entity.xxscm_inv_receiver));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_asn))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_asn.Contains(p_entity.xxscm_inv_asn));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_part))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_part.Contains(p_entity.xxscm_inv_part));
|
|
}
|
|
if (p_entity.xxscm_inv_qty != 0)
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_qty == p_entity.xxscm_inv_qty);
|
|
}
|
|
if (p_entity.xxscm_inv_price != 0)
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_price == p_entity.xxscm_inv_price);
|
|
}
|
|
|
|
if (p_entity.xxscm_inv_taxamt != 0)
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_taxamt == p_entity.xxscm_inv_taxamt);
|
|
}
|
|
if (p_entity.xxscm_inv_amt != 0)
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_amt == p_entity.xxscm_inv_amt);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_qadread))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_qadread.Contains(p_entity.xxscm_inv_qadread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_wmsread))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_wmsread.Contains(p_entity.xxscm_inv_wmsread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_scmread))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_scmread.Contains(p_entity.xxscm_inv_scmread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_mesread))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_mesread.Contains(p_entity.xxscm_inv_mesread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_rmks))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_rmks.Contains(p_entity.xxscm_inv_rmks));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_createur))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_createur.Contains(p_entity.xxscm_inv_createur));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxscm_inv_updateur))
|
|
{
|
|
q = q.Where(p => p.xxscm_inv_updateur.Contains(p_entity.xxscm_inv_updateur));
|
|
}
|
|
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = q.ToList();
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxscm_inv_det), "Get_xxscm_inv_det_List", e.Message);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
public ResultObject<bool> Save_xxscm_inv_det(List<xxscm_inv_det> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxscm_inv_det.AddOrUpdate(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxscm_inv_det), "Save_xxscm_inv_det", e.Message);
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
public ResultObject<bool> Del_xxscm_inv_det(List<xxscm_inv_det> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxscm_inv_det.Remove(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxscm_inv_det), "Del_xxscm_inv_det", e.Message); throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static ResultObject<List<xxqad_prh_det>> Get_xxqad_prh_det_List(xxqad_prh_det p_entity)
|
|
{
|
|
ResultObject<List<xxqad_prh_det>> _ret = new ResultObject<List<xxqad_prh_det>>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
IQueryable<xxqad_prh_det> q = db.xxqad_prh_det;
|
|
if (p_entity.xxqad_prh_uid != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_uid == p_entity.xxqad_prh_uid);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_seq))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_seq.Contains(p_entity.xxqad_prh_seq));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_receiver))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_receiver.Contains(p_entity.xxqad_prh_receiver));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_psnbr))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_psnbr.Contains(p_entity.xxqad_prh_psnbr));
|
|
}
|
|
if (p_entity.xxqad_prh_trnbr != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_trnbr == p_entity.xxqad_prh_trnbr);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_trtype))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_trtype.Contains(p_entity.xxqad_prh_trtype));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_po_nbr))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_po_nbr.Contains(p_entity.xxqad_prh_po_nbr));
|
|
}
|
|
if (p_entity.xxqad_prh_po_line != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_po_line == p_entity.xxqad_prh_po_line);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_part))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_part.Contains(p_entity.xxqad_prh_part));
|
|
}
|
|
if (p_entity.xxqad_prh_qty_rcvd != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_qty_rcvd == p_entity.xxqad_prh_qty_rcvd);
|
|
}
|
|
if (p_entity.xxqad_prh_qty_ord != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_qty_ord == p_entity.xxqad_prh_qty_ord);
|
|
}
|
|
if (p_entity.xxqad_prh_pur_cost != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_pur_cost == p_entity.xxqad_prh_pur_cost);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_curr))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_curr.Contains(p_entity.xxqad_prh_curr));
|
|
}
|
|
if (p_entity.xxqad_prh_curr_amt != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_curr_amt == p_entity.xxqad_prh_curr_amt);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_site))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_site.Contains(p_entity.xxqad_prh_site));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_vend))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_vend.Contains(p_entity.xxqad_prh_vend));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_ware_class))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_ware_class.Contains(p_entity.xxqad_prh_ware_class));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_ware))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_ware.Contains(p_entity.xxqad_prh_ware));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_loc))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_loc.Contains(p_entity.xxqad_prh_loc));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_po_um))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_po_um.Contains(p_entity.xxqad_prh_po_um));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_loc_um))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_loc_um.Contains(p_entity.xxqad_prh_loc_um));
|
|
}
|
|
if (p_entity.xxqad_prh_conv != 0)
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_conv == p_entity.xxqad_prh_conv);
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_lot))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_lot.Contains(p_entity.xxqad_prh_lot));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_vend_batch))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_vend_batch.Contains(p_entity.xxqad_prh_vend_batch));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_qadread))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_qadread.Contains(p_entity.xxqad_prh_qadread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_wmsread))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_wmsread.Contains(p_entity.xxqad_prh_wmsread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_scmread))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_scmread.Contains(p_entity.xxqad_prh_scmread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_mesread))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_mesread.Contains(p_entity.xxqad_prh_mesread));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_rmks))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_rmks.Contains(p_entity.xxqad_prh_rmks));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_createur))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_createur.Contains(p_entity.xxqad_prh_createur));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_updateur))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_updateur.Contains(p_entity.xxqad_prh_updateur));
|
|
}
|
|
if (!string.IsNullOrEmpty(p_entity.xxqad_prh_domain))
|
|
{
|
|
q = q.Where(p => p.xxqad_prh_domain.Contains(p_entity.xxqad_prh_domain));
|
|
}
|
|
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = q.ToList();
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_prh_det), "Get_xxqad_prh_det_List", e.Message);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
public ResultObject<bool> Save_xxqad_prh_det(List<xxqad_prh_det> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxqad_prh_det.AddOrUpdate(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_prh_det), "Save_xxqad_prh_det", e.Message);
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
public ResultObject<bool> Del_xxqad_prh_det(List<xxqad_prh_det> p_entitys)
|
|
{
|
|
ResultObject<bool> _ret = new ResultObject<bool>();
|
|
try
|
|
{
|
|
using (UniApiEntities db = EntitiesFactory.CreateUniApiInstance())
|
|
{
|
|
foreach (var itm in p_entitys)
|
|
{
|
|
db.xxqad_prh_det.Remove(itm);
|
|
}
|
|
if (db.SaveChanges() != -1)
|
|
{
|
|
_ret.State = ReturnStatus.Succeed;
|
|
_ret.Result = true;
|
|
}
|
|
else
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
_ret.State = ReturnStatus.Failed;
|
|
_ret.Result = false;
|
|
_ret.ErrorList.Add(e);
|
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(xxqad_prh_det), "Del_xxqad_prh_det", e.Message); throw e;
|
|
}
|
|
return _ret;
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|