本文整理汇总了C#中com.Sconit.Entity.MasterData.User类的典型用法代码示例。如果您正苦于以下问题:C# User类的具体用法?C# User怎么用?C# User使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
User类属于com.Sconit.Entity.MasterData命名空间,在下文中一共展示了User类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: RecordLocationTransaction
public void RecordLocationTransaction(OrderLocationTransaction orderLocationTransaction, InventoryTransaction inventoryTransaction, Receipt receipt, User user)
{
LocationTransaction locationTransaction = GenerateOrderLocationTransaction(orderLocationTransaction, orderLocationTransaction.Location, user);
if (inventoryTransaction.Hu != null)
{
locationTransaction.HuId = inventoryTransaction.Hu.HuId;
locationTransaction.LotNo = inventoryTransaction.Hu.LotNo;
}
if (locationTransaction.LotNo == null || locationTransaction.LotNo == string.Empty)
{
locationTransaction.LotNo = inventoryTransaction.LotNo;
}
locationTransaction.BatchNo = inventoryTransaction.LocationLotDetailId;
locationTransaction.ReceiptNo = receipt.ReceiptNo;
locationTransaction.IpNo = receipt.ReferenceIpNo;
locationTransaction.Qty = inventoryTransaction.Qty;
locationTransaction.EffectiveDate = DateTime.Parse(receipt.CreateDate.ToString("yyyy-MM-dd"));
if (orderLocationTransaction.OrderDetail.OrderHead.Type == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_TRANSFER)
{
OrderLocationTransaction outOrderLocationTransaction = this.orderLocationTransactionMgrE.GetOrderLocationTransaction(orderLocationTransaction.OrderDetail.Id, BusinessConstants.IO_TYPE_OUT)[0];
locationTransaction.RefLocation = outOrderLocationTransaction.Location.Code;
locationTransaction.RefLocationName = outOrderLocationTransaction.Location.Name;
}
this.CreateLocationTransaction(locationTransaction);
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:27,代码来源:LocationTransactionMgr.cs
示例2: AddTransportationBillDetail
public void AddTransportationBillDetail(string billNo, IList<TransportationActBill> transportationActBillList, User user)
{
TransportationBill oldTransportationBill = this.CheckAndLoadTransportationBill(billNo, true);
#region ���״̬
if (oldTransportationBill.Status != BusinessConstants.CODE_MASTER_STATUS_VALUE_CREATE)
{
throw new BusinessErrorException("TransportationBill.Error.StatusErrorWhenAddDetail", oldTransportationBill.Status, oldTransportationBill.BillNo);
}
#endregion
if (transportationActBillList != null && transportationActBillList.Count > 0)
{
foreach (TransportationActBill transportationActBill in transportationActBillList)
{
TransportationActBill oldTransportationActBill = this.transportationActBillMgr.LoadTransportationActBill(transportationActBill.Id);
oldTransportationActBill.CurrentBillQty = transportationActBill.CurrentBillQty;
oldTransportationActBill.CurrentDiscount = transportationActBill.CurrentDiscount;
TransportationBillDetail transportationBillDetail = this.transportationBillDetailMgr.TransferTransportationActBill2TransportationBillDetail(oldTransportationActBill);
transportationBillDetail.Bill = oldTransportationBill;
oldTransportationBill.AddTransportationBillDetail(transportationBillDetail);
this.transportationBillDetailMgr.CreateTransportationBillDetail(transportationBillDetail);
//�ۼ�TransportationActBill�����ͽ��
this.transportationActBillMgr.ReverseUpdateTransportationActBill(null, transportationBillDetail, user);
}
oldTransportationBill.LastModifyDate = DateTime.Now;
oldTransportationBill.LastModifyUser = user;
this.UpdateTransportationBill(oldTransportationBill);
}
}
开发者ID:Novthirteen,项目名称:yfkey-scms,代码行数:34,代码来源:TransportationBillMgr.cs
示例3: CloneHu
public IList<Hu> CloneHu(string huId, decimal uintCount, int count, User user)
{
IList<Hu> huList = new List<Hu>();
Hu oldHu = this.LoadHu(huId);
DateTime dateTimeNow = DateTime.Now;
int i = 0;
while (i < count)
{
Hu huTemplate = CloneHelper.DeepClone<Hu>(oldHu);
huTemplate.LotSize = uintCount;
huTemplate.UnitCount = uintCount;
huTemplate.Qty = uintCount;
#region �����ö����������ɹ��������������ſ�ͷ��Ϊԭ�������룬����������ſ�ͷ��Ϊ��Ʒ����
if (oldHu.HuId.StartsWith(oldHu.Item.Code))
{
huTemplate.HuId = this.numberControlMgr.CloneRMHuId(oldHu.HuId, uintCount);
}
else
{
huTemplate.HuId = this.numberControlMgr.CloneFGHuId(oldHu.HuId);
}
#endregion
huTemplate.CreateDate = dateTimeNow;
huTemplate.CreateUser = user;
huTemplate.Status = BusinessConstants.CODE_MASTER_HU_STATUS_VALUE_CREATE;
this.CreateHu(huTemplate);
huList.Add(huTemplate);
i++;
}
return huList;
}
开发者ID:Novthirteen,项目名称:yfkey-scms,代码行数:34,代码来源:HuMgr.cs
示例4: CheckAuthrize
public static bool CheckAuthrize(PickList pickList, User user)
{
bool partyFromAuthrized = false;
//bool partyToAuthrized = false;
foreach (Permission permission in user.Permissions)
{
if (permission.Code == pickList.PartyFrom.Code)
{
partyFromAuthrized = true;
break;
}
//if (permission.Code == pickList.PartyTo.Code)
//{
// partyToAuthrized = true;
//}
//if (partyFromAuthrized && partyToAuthrized)
//{
// break;
//}
}
//if (!(partyFromAuthrized && partyToAuthrized))
if (!partyFromAuthrized)
{
//没有该订单的操作权限
throw new BusinessErrorException("Order.Error.PickUp.NoPermission", pickList.PickListNo);
}
return true;
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:33,代码来源:PickListHelper.cs
示例5: GetPermissionCriteriaByCategory
public static DetachedCriteria[] GetPermissionCriteriaByCategory(User user, string category)
{
DetachedCriteria[] criteria = new DetachedCriteria[2];
DetachedCriteria upSubCriteria = DetachedCriteria.For<UserPermission>();
upSubCriteria.CreateAlias("User", "u");
upSubCriteria.CreateAlias("Permission", "pm");
upSubCriteria.CreateAlias("pm.Category", "pmc");
upSubCriteria.Add(Expression.Eq("pmc.Type", category));
upSubCriteria.Add(Expression.Eq("u.Code", user.Code));
upSubCriteria.SetProjection(Projections.ProjectionList().Add(Projections.GroupProperty("pm.Code")));
DetachedCriteria rpSubCriteria = DetachedCriteria.For<RolePermission>();
rpSubCriteria.CreateAlias("Role", "r");
rpSubCriteria.CreateAlias("Permission", "pm");
rpSubCriteria.CreateAlias("pm.Category", "pmc");
rpSubCriteria.Add(Expression.Eq("pmc.Type", category));
rpSubCriteria.SetProjection(Projections.ProjectionList().Add(Projections.GroupProperty("pm.Code")));
DetachedCriteria urSubCriteria = DetachedCriteria.For<UserRole>();
urSubCriteria.CreateAlias("User", "u");
urSubCriteria.CreateAlias("Role", "r");
urSubCriteria.Add(Expression.Eq("u.Code", user.Code));
urSubCriteria.SetProjection(Projections.ProjectionList().Add(Projections.GroupProperty("r.Code")));
rpSubCriteria.Add(Subqueries.PropertyIn("r.Code", urSubCriteria));
criteria[0] = upSubCriteria;
criteria[1] = rpSubCriteria;
return criteria;
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:32,代码来源:SecurityHelper.cs
示例6: CreateUserRoles
public void CreateUserRoles(User user, IList<Role> rList)
{
foreach (Role role in rList)
{
UserRole userRole = new UserRole();
userRole.User = user;
userRole.Role = role;
entityDao.CreateUserRole(userRole);
}
}
开发者ID:Novthirteen,项目名称:yfkey-scms,代码行数:10,代码来源:UserRoleMgr.cs
示例7: CreateUserPermissions
public void CreateUserPermissions(User user, IList<Permission> rList)
{
foreach (Permission permission in rList)
{
UserPermission userPermission = new UserPermission();
userPermission.User = user;
userPermission.Permission = permission;
entityDao.CreateUserPermission(userPermission);
}
}
开发者ID:Novthirteen,项目名称:yfkey-scms,代码行数:10,代码来源:UserPermissionMgr.cs
示例8: RecordWOBackflushLocationTransaction
public void RecordWOBackflushLocationTransaction(OrderLocationTransaction orderLocationTransaction, string huId, string lotNo, decimal qty, string ipNo, User user, Location locFrom)
{
LocationTransaction locationTransaction = new LocationTransaction();
OrderDetail orderDetail = orderLocationTransaction.OrderDetail;
OrderHead orderHead = orderDetail.OrderHead;
string prodline = orderHead.Flow;
locationTransaction.OrderNo = orderHead.OrderNo;
locationTransaction.OrderDetailId = orderDetail.Id;
locationTransaction.OrderLocationTransactionId = orderLocationTransaction.Id;
locationTransaction.ExternalOrderNo = orderHead.ExternalOrderNo;
locationTransaction.ReferenceOrderNo = orderHead.ReferenceOrderNo;
locationTransaction.IpNo = ipNo;
//locationTransaction.ReceiptNo =
//locationTransaction.TransactionType = orderLocationTransaction.TransactionType;
locationTransaction.TransactionType = BusinessConstants.CODE_MASTER_LOCATION_TRANSACTION_TYPE_VALUE_ISS_WO_BF; //投料回冲事务写死 ISS-WO-BF
locationTransaction.Item = orderLocationTransaction.Item.Code;
locationTransaction.ItemDescription = orderLocationTransaction.Item.Description;
locationTransaction.Uom = orderLocationTransaction.Item.Uom.Code;
//locationTransaction.Qty =
locationTransaction.PartyFrom = orderHead.PartyFrom.Code;
locationTransaction.PartyFromName = orderHead.PartyFrom.Name;
locationTransaction.PartyTo = orderHead.PartyTo.Code;
locationTransaction.PartyToName = orderHead.PartyTo.Name;
locationTransaction.ShipFrom = orderHead.ShipFrom != null ? orderHead.ShipFrom.Code : null;
locationTransaction.ShipFromAddress = orderHead.ShipFrom != null ? orderHead.ShipFrom.Address : null;
locationTransaction.ShipTo = orderHead.ShipTo != null ? orderHead.ShipTo.Code : null;
locationTransaction.ShipToAddress = orderHead.ShipTo != null ? orderHead.ShipTo.Address : null;
locationTransaction.Location = prodline;
locationTransaction.LocationName = prodline;
locationTransaction.DockDescription = orderHead.DockDescription;
locationTransaction.Carrier = orderHead.Carrier != null ? orderHead.Carrier.Code : null;
locationTransaction.CarrierBillCode = orderHead.CarrierBillAddress != null ? orderHead.CarrierBillAddress.Code : null;
locationTransaction.CarrierBillAddress = orderHead.CarrierBillAddress != null ? orderHead.CarrierBillAddress.Address : null;
locationTransaction.CreateDate = DateTime.Now;
locationTransaction.CreateUser = user.Code;
if (huId != null && huId.Trim() != string.Empty)
{
locationTransaction.HuId = huId;
}
if (lotNo != null && lotNo.Trim() != string.Empty)
{
locationTransaction.LotNo = lotNo;
}
locationTransaction.Qty = 0 - qty;
locationTransaction.EffectiveDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"));
locationTransaction.RefLocation = locFrom.Code;
locationTransaction.RefLocationName = locFrom.Name;
this.CreateLocationTransaction(locationTransaction);
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:52,代码来源:LocationTransactionMgr.cs
示例9: GetALlPermissionsByCategory
public IList<Permission> GetALlPermissionsByCategory(string categoryCode, User user)
{
DetachedCriteria criteria = DetachedCriteria.For(typeof(Permission));
DetachedCriteria[] pCrieteria = SecurityHelper.GetPermissionCriteriaByCategory(user, categoryCode);
criteria.Add(
Expression.Or(
Subqueries.PropertyIn("Code", pCrieteria[0]),
Subqueries.PropertyIn("Code", pCrieteria[1])));
return criteriaMgrE.FindAll<Permission>(criteria);
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:13,代码来源:PermissionMgr.cs
示例10: CancelTransportationOrder
public void CancelTransportationOrder(TransportationOrder order, User user)
{
if (order.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_CLOSE || order.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_COMPLETE)
{
throw new BusinessErrorException("TransportationOrder.Error.StatusErrorWhenCancel", order.Status, order.OrderNo);
}
#region ��鿪��Ʊ�IJ���ȡ��
IList<TransportationActBill> actBillList = transportationActBillMgr.GetTransportationActBill(order);
var i = (from c in actBillList
where c.BilledAmount > 0
select c).Count();
#endregion
if (i > 0)
{
throw new BusinessErrorException("TransportationOrder.Error.BillAmountErrorWhenCancel", order.OrderNo);
}
#region �ر�actbill
if (actBillList != null && actBillList.Count > 0)
{
foreach (TransportationActBill actBill in actBillList)
{
actBill.Status = BusinessConstants.CODE_MASTER_STATUS_VALUE_CLOSE;
actBill.LastModifyDate = DateTime.Now;
actBill.LastModifyUser = user;
transportationActBillMgr.UpdateTransportationActBill(actBill);
}
}
#endregion
#region ɾ����asn�Ĺ���
foreach (TransportationOrderDetail orderDetail in order.OrderDetails)
{
InProcessLocation ip = orderDetail.InProcessLocation;
ip.IsReferenced = false;
inProcessLocationMgr.UpdateInProcessLocation(ip);
}
#endregion
#region �����˵�ͷ
order.CancelDate = DateTime.Now;
order.CancelUser = user;
order.LastModifyDate = DateTime.Now;
order.LastModifyUser = user;
order.Status = BusinessConstants.CODE_MASTER_STATUS_VALUE_CANCEL;
this.UpdateTransportationOrder(order);
#endregion
}
开发者ID:Novthirteen,项目名称:yfkey-scms,代码行数:50,代码来源:TransportationOrderMgr.cs
示例11: RecordBillTransaction
public void RecordBillTransaction(BillDetail billDetail, User user, bool isCancel)
{
DateTime dateTimeNow = DateTime.Now;
BillTransaction billTransaction = new BillTransaction();
billTransaction.OrderNo = billDetail.ActingBill.OrderHead.OrderNo;
billTransaction.ExternalReceiptNo = billDetail.ActingBill.ExternalReceiptNo;
billTransaction.ReceiptNo = billDetail.ActingBill.ReceiptNo;
billTransaction.Item = billDetail.ActingBill.Item.Code;
billTransaction.ItemDescription = billDetail.ActingBill.Item.Description;
billTransaction.Uom = billDetail.ActingBill.Uom.Code;
billTransaction.BillAddress = billDetail.ActingBill.BillAddress.Code;
billTransaction.BillAddressDescription = billDetail.ActingBill.BillAddress.Address;
billTransaction.Party = billDetail.ActingBill.BillAddress.Party.Code;
billTransaction.PartyName = billDetail.ActingBill.BillAddress.Party.Name;
if (!isCancel)
{
billTransaction.Qty = billDetail.BilledQty;
}
else
{
billTransaction.Qty = billDetail.BilledQty * -1;
}
billTransaction.EffectiveDate = DateTime.Parse(dateTimeNow.ToShortDateString()); //仅保留年月日;
if (billDetail.ActingBill.TransactionType == BusinessConstants.BILL_TRANS_TYPE_PO)
{
billTransaction.TransactionType = BusinessConstants.BILL_TRANS_TYPE_PO_BILL;
}
else
{
billTransaction.TransactionType = BusinessConstants.BILL_TRANS_TYPE_SO_BILL;
}
//billTransaction.PlannedBill = billDetail.ActingBill.Id;
billTransaction.BillDetailId = billDetail.Id;
billTransaction.CreateUser = user.Code;
billTransaction.CreateDate = dateTimeNow;
billTransaction.ActingBill = billDetail.ActingBill.Id;
billTransaction.LocationFrom = billDetail.ActingBill.LocationFrom;
billTransaction.IpNo = billDetail.ActingBill.IpNo;
billTransaction.ReferenceItemCode = billDetail.ActingBill.ReferenceItemCode;
//billTransaction.Location = billDetail.ActingBill.LocationFrom;
//billTransaction.LocationName = locationLotDetail.Location.Name;
//billTransaction.HuId = locationLotDetail.Hu != null ? locationLotDetail.Hu.HuId : string.Empty;
//billTransaction.LotNo = locationLotDetail.LotNo;
//billTransaction.BatchNo = locationLotDetail.Id;
this.CreateBillTransaction(billTransaction);
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:48,代码来源:BillTransactionMgr.cs
示例12: CreateHuOdd
public HuOdd CreateHuOdd(ReceiptDetail receiptDetail, LocationLotDetail locationLotDetail, User user)
{
OrderLocationTransaction orderLocationTransaction = receiptDetail.OrderLocationTransaction;
OrderDetail orderDetail = orderLocationTransaction.OrderDetail;
DateTime dateTimeNow = DateTime.Now;
HuOdd huOdd = new HuOdd();
huOdd.OrderDetail = orderDetail;
huOdd.LocationLotDetail = locationLotDetail;
huOdd.OddQty = receiptDetail.ReceivedQty.Value;
huOdd.Status = BusinessConstants.CODE_MASTER_STATUS_VALUE_CREATE;
huOdd.CreatedQty = 0;
huOdd.CreateUser = user;
huOdd.CreateDate = dateTimeNow;
huOdd.LastModifyUser = user;
huOdd.LastModifyDate = dateTimeNow;
this.CreateHuOdd(huOdd);
return huOdd;
}
开发者ID:Novthirteen,项目名称:yfkey-scms,代码行数:20,代码来源:HuOddMgr.cs
示例13: CreateRegion
public void CreateRegion(Region entity, User currentUser)
{
if (partyDao.LoadParty(entity.Code) == null)
{
base.CreateRegion(entity);
}
else
{
CreateRegionOnly(entity);
}
Permission permission = new Permission();
permission.Category = permissionCategoryMgr.LoadPermissionCategory(BusinessConstants.CODE_MASTER_PERMISSION_CATEGORY_TYPE_VALUE_REGION);
permission.Code = entity.Code;
permission.Description = entity.Name;
permissionMgr.CreatePermission(permission);
UserPermission userPermission = new UserPermission();
userPermission.User = currentUser;
userPermission.Permission = permission;
userPermissionMgr.CreateUserPermission(userPermission);
}
开发者ID:Novthirteen,项目名称:yfkey-scms,代码行数:20,代码来源:RegionMgr.cs
示例14: RecordBillTransaction
public void RecordBillTransaction(PlannedBill plannedBill, ActingBill actingBill, LocationLotDetail locationLotDetail, User user)
{
#region 记BillTransaction
DateTime dateTimeNow = DateTime.Now;
BillTransaction billTransaction = new BillTransaction();
billTransaction.OrderNo = plannedBill.OrderNo;
billTransaction.ExternalReceiptNo = plannedBill.ExternalReceiptNo;
billTransaction.ReceiptNo = plannedBill.ReceiptNo;
billTransaction.Item = plannedBill.Item.Code;
billTransaction.ItemDescription = plannedBill.Item.Description;
billTransaction.Uom = plannedBill.Uom.Code;
billTransaction.BillAddress = plannedBill.BillAddress.Code;
billTransaction.BillAddressDescription = plannedBill.BillAddress.Address;
billTransaction.Party = plannedBill.BillAddress.Party.Code;
billTransaction.PartyName = plannedBill.BillAddress.Party.Name;
billTransaction.Qty = plannedBill.CurrentActingQty;
billTransaction.EffectiveDate = DateTime.Parse(dateTimeNow.ToShortDateString()); //仅保留年月日;
billTransaction.TransactionType = plannedBill.TransactionType;
billTransaction.PlannedBill = plannedBill.Id;
billTransaction.CreateUser = user.Code;
billTransaction.CreateDate = dateTimeNow;
billTransaction.ActingBill = actingBill.Id;
billTransaction.LocationFrom = plannedBill.LocationFrom;
billTransaction.PartyFrom = plannedBill.PartyFrom;
billTransaction.IpNo = plannedBill.IpNo;
billTransaction.ReferenceItemCode = plannedBill.ReferenceItemCode;
if (locationLotDetail != null)
{
billTransaction.Location = locationLotDetail.Location.Code;
billTransaction.LocationName = locationLotDetail.Location.Name;
billTransaction.HuId = locationLotDetail.Hu != null ? locationLotDetail.Hu.HuId : string.Empty;
billTransaction.LotNo = locationLotDetail.LotNo;
billTransaction.BatchNo = locationLotDetail.Id;
}
this.CreateBillTransaction(billTransaction);
#endregion
}
开发者ID:Novthirteen,项目名称:yfkey-scms,代码行数:39,代码来源:BillTransactionMgr.cs
示例15: CreateHu
public IList<Hu> CreateHu(IList<FlowDetail> flowDetailList, User user, string idMark, string packageType)
{
if (flowDetailList != null && flowDetailList.Count > 0)
{
IList<Hu> huList = new List<Hu>();
int? huLotSize = null;
foreach (FlowDetail flowDetail in flowDetailList)
{
Flow flow = flowDetail.Flow;
if (packageType == BusinessConstants.CODE_MASTER_PACKAGETYPE_INNER)
{
huLotSize = Convert.ToInt32(flowDetail.UnitCount);
}
else
{
huLotSize = flowDetail.HuLotSize;
}
if (flow.Type != BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PRODUCTION)
{
IListHelper.AddRange<Hu>(huList,
CreateHu(flowDetail.Item, flowDetail.OrderedQty, flowDetail.HuLotNo, flowDetail.Uom, flowDetail.UnitCount, huLotSize,
null, null, null, flowDetail.Flow.PartyFrom, BusinessConstants.CODE_MASTER_ITEM_QUALITY_LEVEL_VALUE_1, user, flowDetail, null, flowDetail.ItemVersion, idMark,flowDetail.CustomerItemCode));
}
else
{
IListHelper.AddRange<Hu>(huList,
CreateHu(flowDetail.Item, flowDetail.OrderedQty, flowDetail.HuLotNo, flowDetail.Uom, flowDetail.UnitCount, huLotSize,
null, null, null, flowDetail.Flow.PartyFrom, BusinessConstants.CODE_MASTER_ITEM_QUALITY_LEVEL_VALUE_1, user, flowDetail, flowDetail.HuShiftCode, flowDetail.ItemVersion, idMark,flowDetail.CustomerItemCode));
}
}
return huList;
}
return null;
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:37,代码来源:HuMgr.cs
示例16: SaveShiftPlanSchedule
public void SaveShiftPlanSchedule(IList<ShiftPlanSchedule> shiftPlanScheduleList, User user)
{
if (shiftPlanScheduleList != null && shiftPlanScheduleList.Count > 0)
{
foreach (ShiftPlanSchedule shiftPlanSchedule in shiftPlanScheduleList)
{
this.SaveShiftPlanSchedule(shiftPlanSchedule, user);
}
}
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:10,代码来源:ShiftPlanScheduleMgr.cs
示例17: TranslateMessage
public string TranslateMessage(string content, User user, params string[] parameters)
{
//try
//{
// content = ProcessMessage(content, parameters);
// if (user != null && user.UserLanguage != null && user.UserLanguage != string.Empty)
// {
// content = this.ProcessLanguage(content, user.UserLanguage);
// }
// else
// {
// EntityPreference defaultLanguage = entityPreferenceMgrE.LoadEntityPreference(BusinessConstants.ENTITY_PREFERENCE_CODE_DEFAULT_LANGUAGE);
// content = this.ProcessLanguage(content, defaultLanguage.Value);
// }
//}
//catch (Exception ex)
//{
// throw new TechnicalException("翻译时出现异常:" + ex.Message);
//}
//return content;
string language = null;
if (user != null && user.UserLanguage != null && user.UserLanguage != string.Empty)
{
language = user.UserLanguage;
}
else
{
EntityPreference defaultLanguage = entityPreferenceMgrE.LoadEntityPreference(BusinessConstants.ENTITY_PREFERENCE_CODE_DEFAULT_LANGUAGE);
language = defaultLanguage.Value;
}
return TranslateContent(content, language, parameters);
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:34,代码来源:LanguageMgr.cs
示例18: CloneHu
public IList<Hu> CloneHu(Hu hu, decimal uintCount, int count, User user)
{
return CloneHu(hu.HuId, uintCount, count, user);
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:4,代码来源:HuMgr.cs
示例19: SaveMiscOrder
public MiscOrder SaveMiscOrder(MiscOrder miscOrder, User user)
{
MiscOrder dbMiscOrder = null;
if (miscOrder != null && miscOrder.OrderNo != null)
{
dbMiscOrder = miscOrderDao.LoadMiscOrder(miscOrder.OrderNo);
}
if (dbMiscOrder != null)
{
IList<MiscOrderDetail> dbMiscOrderDets = dbMiscOrder.MiscOrderDetails;
foreach (MiscOrderDetail miscOrderDet in dbMiscOrderDets)
{
miscOrderDetailMgrE.DeleteMiscOrderDetail(miscOrderDet);
}
MiscOrder pageMiscOrder = miscOrder;
IList<MiscOrderDetail> pageMiscOrderDets = pageMiscOrder.MiscOrderDetails;
foreach (MiscOrderDetail miscOrderDet in pageMiscOrderDets)
{
miscOrderDet.MiscOrder = pageMiscOrder;
miscOrderDetailMgrE.CreateMiscOrderDetail(miscOrderDet);
}
dbMiscOrder.Remark = pageMiscOrder.Remark;
dbMiscOrder.Reason = pageMiscOrder.Reason;
dbMiscOrder.EffectiveDate = pageMiscOrder.EffectiveDate;
dbMiscOrder.Location = pageMiscOrder.Location;
dbMiscOrder.CreateDate = DateTime.Now;
miscOrderDao.UpdateMiscOrder(dbMiscOrder);
}
else
{
dbMiscOrder = miscOrder;
dbMiscOrder.CreateUser = user;
dbMiscOrder.CreateDate = DateTime.Now;
dbMiscOrder.OrderNo = numberControlMgrE.GenerateNumber(BusinessConstants.CODE_PREFIX_MISCO);
miscOrderDao.CreateMiscOrder(dbMiscOrder);
IList<MiscOrderDetail> pageMiscOrderDets = dbMiscOrder.MiscOrderDetails;
foreach (MiscOrderDetail miscOrderDet in pageMiscOrderDets)
{
miscOrderDet.MiscOrder = dbMiscOrder;
miscOrderDetailMgrE.CreateMiscOrderDetail(miscOrderDet);
//出入库
if (dbMiscOrder.Type == BusinessConstants.CODE_MASTER_MISC_ORDER_TYPE_VALUE_GI)
{
//出库
this.locationMgrE.InventoryOut(miscOrderDet, user);
}
else if (dbMiscOrder.Type == BusinessConstants.CODE_MASTER_MISC_ORDER_TYPE_VALUE_GR)
{
//入库
this.locationMgrE.InventoryIn(miscOrderDet, user);
}
else if (dbMiscOrder.Type == BusinessConstants.CODE_MASTER_MISC_ORDER_TYPE_VALUE_ADJ)
{
//用入库操作就可以做调整
this.locationMgrE.InventoryIn(miscOrderDet, user);
//if (miscOrderDet.Qty > 0)
//{
// //入库
// this.locationMgrE.InventoryIn(miscOrderDet, user);
//}
//else if (miscOrderDet.Qty < 0)
//{
// //出库
// miscOrderDet.Qty = miscOrderDet.Qty * -1; //调整为正数
// this.locationMgrE.InventoryOut(miscOrderDet, user);
//}
}
else
{
throw new TechnicalException("MiscOrder Type:" + dbMiscOrder.Type + " is not valided");
}
}
}
return ReLoadMiscOrder(dbMiscOrder.OrderNo);
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:81,代码来源:MiscOrderMgr.cs
注:本文中的com.Sconit.Entity.MasterData.User类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论