本文整理汇总了C#中XPCollection类的典型用法代码示例。如果您正苦于以下问题:C# XPCollection类的具体用法?C# XPCollection怎么用?C# XPCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XPCollection类属于命名空间,在下文中一共展示了XPCollection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: FrmEmpleado
public FrmEmpleado(XPCollection xpcEmpleado, XPCollection xpcDepartamento, XPCollection xpcTipoNomina,XPCollection xpcPuesto,XPCollection xpcTipoEmpleado,XPCollection xpcGrupoEmpleado, XPCollection xpcPercepcion, XPCollection xpcDeduccion,XPCollection xpcConcepto,XPCollection xpcCuentaContable, UnitOfWork uow)
{
InitializeComponent();
this.uow = uow;
this.xpcEmpleado = xpcEmpleado;
this.xpcEmpleado.Session = uow;
this.xpcDepartamento=xpcDepartamento;
this.xpcTipoNomina=xpcTipoNomina;
this.xpcPuesto=xpcPuesto;
this.xpcTipoEmpleado=xpcTipoEmpleado;
this.xpcGrupoEmpleado = xpcGrupoEmpleado;
this.xpcDepartamento.Session = uow;
this.xpcTipoNomina.Session = uow;
this.xpcPuesto.Session = uow;
this.xpcTipoEmpleado.Session = uow;
this.xpcGrupoEmpleado.Session = uow;
this.xpcPercepcion = xpcPercepcion;
this.xpcPercepcion.Session = uow;
this.xpcDeduccion = xpcDeduccion;
this.xpcDeduccion.Session = uow;
this.xpcConcepto = xpcConcepto;
this.xpcConcepto.Session = uow;
this.xpcCuentaContable = xpcCuentaContable;
this.xpcCuentaContable.Session = uow;
RecargarColecciones();
gridEmpleado.DataSource = this.xpcEmpleado;
UpdateMenu();
grdEmpleado.Columns.Clear();
grdEmpleado.Columns.AddVisible("Oid");
grdEmpleado.Columns.AddVisible("ApellidoPaterno");
grdEmpleado.Columns.AddVisible("ApellidoMaterno");
grdEmpleado.Columns.AddVisible("Nombre");
grdEmpleado.BestFitColumns();
RefreshGrid();
}
开发者ID:jmurataya,项目名称:Nomina,代码行数:35,代码来源:FrmEmpleado.cs
示例2: FrmCrearTipoNomina
public FrmCrearTipoNomina(TipoNomina tiponomina, XPCollection xpcTipoNomina, UnitOfWork uow)
: this()
{
this.TipoNomina = tiponomina;
this.uow = uow;
this.xpcTipoNomina = xpcTipoNomina;
}
开发者ID:jmurataya,项目名称:Nomina,代码行数:7,代码来源:FrmCrearTipoNomina.cs
示例3: FrmCrearTipoEmpleado
public FrmCrearTipoEmpleado(TipoEmpleado tipoempleado, XPCollection xpcTipoEmpleado, UnitOfWork uow)
: this()
{
this.TipoEmpleado = tipoempleado;
this.uow = uow;
this.xpcTipoEmpleado = xpcTipoEmpleado;
}
开发者ID:jmurataya,项目名称:Nomina,代码行数:7,代码来源:FrmCrearTipoEmpleado.cs
示例4: SynchronizeTypes
void SynchronizeTypes(UnitOfWork unitOfWork) {
var xpObjectTypes = new XPCollection<XPObjectType>(unitOfWork);
var dataStoreManager = new SqlMultiDataStoreProxy(ConnectionString);
foreach (var xpObjectType in xpObjectTypes) {
var type = ReflectionHelper.FindType(xpObjectType.TypeName);
if (type != null) {
var connectionString = dataStoreManager.DataStoreManager.GetConnectionString(type);
var sqlDataStoreProxy = new SqlDataStoreProxy(connectionString);
var xpoObjectHacker = new XpoObjectHacker();
XPObjectType type1 = xpObjectType;
var simpleDataLayer = new SimpleDataLayer(sqlDataStoreProxy);
var session = new Session(simpleDataLayer);
bool sync = false;
sqlDataStoreProxy.DataStoreModifyData += (sender, args) => {
var insertStatement = args.ModificationStatements.OfType<InsertStatement>().Where(statement => statement.TableName == typeof(XPObjectType).Name).SingleOrDefault();
if (insertStatement != null && !sync) {
sync = true;
xpoObjectHacker.CreateObjectTypeIndetifier(insertStatement, simpleDataLayer, type1.Oid);
ModificationResult modificationResult = sqlDataStoreProxy.ModifyData(insertStatement);
args.ModificationResult = modificationResult;
args.ModificationResult.Identities = new[] { new ParameterValue { Value = type1.Oid }, };
}
};
if (session.FindObject<XPObjectType>(objectType => objectType.TypeName == type1.TypeName) == null) {
var objectType = new XPObjectType(session, xpObjectType.AssemblyName, xpObjectType.TypeName);
session.Save(objectType);
}
}
}
}
开发者ID:gvilas,项目名称:eXpand,代码行数:32,代码来源:WorldCreatorModuleBase.cs
示例5: frmShipmentFromWH_Load
private void frmShipmentFromWH_Load(object sender, EventArgs e)
{
session = new Session();
XPCollection<Customer> customers = new XPCollection<Customer>(session);
cboCustomer.Properties.DataSource = customers;
if (customers.Count > 0)
cboCustomer.EditValue = customers[0].Oid;
XPCollection<WareHouse> warehouses = new XPCollection<WareHouse>(session);
lueWarehouse.Properties.DataSource = warehouses;
if (warehouses.Count > 0)
lueWarehouse.EditValue = warehouses[0].Oid;
cboSortBy.Properties.Items.Add("先交期, 后优先");
cboSortBy.Properties.Items.Add("先优先, 后交期");
sSetting = ShipmentSetting.GetInstance(session);
fromWH = new Shipment_FromWH();
dateLastNeedDate.DateTime = DateTime.Today.AddDays(sSetting.NoOfDay);
if (sSetting.SortBy == ShipmentSetting.SortType.DatePriority)
cboSortBy.SelectedIndex = 0;
else
cboSortBy.SelectedIndex = 1;
chkSSTK.Checked = sSetting.IncludeSSTK;
}
开发者ID:kamchung322,项目名称:Namwah,代码行数:29,代码来源:frmShipmentFromWH.cs
示例6: AssignCategory
void AssignCategory(RFCategory goodRfCategory, RFCategory veryGoodRfCategory, RFCategory bestRfCategory, RFCategory badRfCategory) {
var session = ((ObjectSpace)ObjectSpace).Session;
var customers = new XPCollection<RFCustomer>(session);
for (int i = 0; i < customers.Count; i++) {
switch (i) {
case 0:
customers[i].Category = goodRfCategory;
break;
case 1:
customers[i].Category = veryGoodRfCategory;
break;
case 2:
customers[i].Category = bestRfCategory;
break;
case 3:
customers[i].Category = badRfCategory;
break;
case 4:
customers[i].Category = goodRfCategory;
break;
case 5:
customers[i].Category = veryGoodRfCategory;
break;
case 6:
customers[i].Category = bestRfCategory;
break;
}
}
}
开发者ID:testexpand,项目名称:eXpand,代码行数:29,代码来源:Updater.cs
示例7: GetAverageTurnOverMonthByYearBySupplier
public decimal GetAverageTurnOverMonthByYearBySupplier(int year, Supplier supplier)
{
Decimal cost = 0;
try
{
DateTime minValue = new DateTime(year, 1, 1);
DateTime maxValue = new DateTime(year, 12, 31);
XPCollection<Cost> costs = new XPCollection<Cost>(uow, Cost.Fields.tas_TNR_SUPPLIER == supplier
& Cost.Fields.Date >= minValue & Cost.Fields.Date <= maxValue);
decimal months = 1;
if (minValue.Year == DateTime.Now.Year)
months = Math.Round(Convert.ToDecimal(System.DateTime.Now.Subtract(minValue).TotalDays) / Convert.ToDecimal(30.5), 0);
else
months = 12;
cost = costs.Sum(q => q.PurchaseAmount) / months;
}
catch (Exception exception1)
{
Exception innerException = exception1;
throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
}
return cost;
}
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:25,代码来源:CostBL.cs
示例8: FrmCrearCuentaContable
public FrmCrearCuentaContable(CuentaContable cuentacontable, XPCollection xpcCuentaContable, UnitOfWork uow)
: this()
{
this.CuentaContable = cuentacontable;
this.uow = uow;
this.xpcCuentaContable = xpcCuentaContable;
}
开发者ID:jmurataya,项目名称:Nomina,代码行数:7,代码来源:FrmCrearCuentaContable.cs
示例9: FrmCrearGrupoEmpleado
public FrmCrearGrupoEmpleado(GrupoEmpleado grupoempleado, XPCollection xpcGrupoEmpleado, UnitOfWork uow)
: this()
{
this.GrupoEmpleado = grupoempleado;
this.uow = uow;
this.xpcGrupoEmpleado = xpcGrupoEmpleado;
}
开发者ID:jmurataya,项目名称:Nomina,代码行数:7,代码来源:FrmCrearGrupoEmpleado.cs
示例10: btnCreateProdOrderPickList_Execute
private void btnCreateProdOrderPickList_Execute(object sender, SimpleActionExecuteEventArgs e)
{
if (View.CurrentObject == null)
return;
XPObjectSpace objectSpace = (XPObjectSpace)Application.CreateObjectSpace();
ProdBom pBom = (ProdBom)View.CurrentObject;
XPCollection<ProdBom> prodBoms = new XPCollection<ProdBom>(objectSpace.Session);
prodBoms.Criteria = DevExpress.Data.Filtering.CriteriaOperator.Parse(string.Format("Oid = '{0}'", pBom.Oid));
ProdBom prodBom = prodBoms[0];
ProdOrder pOrder = prodBom.ProdOrder;
ProdOrderStart prodOrderStart = pOrder.GetLastProdOrderStart();
ProdOrderPickList pickList = objectSpace.CreateObject<ProdOrderPickList>();
pickList.ProdBom = prodBom;
pickList.ProdOrderStart = prodOrderStart;
pickList.PickQty = pickList.RecommendQty;
e.ShowViewParameters.CreatedView = Application.CreateDetailView(objectSpace, pickList);
e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow;
e.ShowViewParameters.Context = TemplateContext.PopupWindow;
e.ShowViewParameters.CreateAllControllers = true;
DialogController dialogController = new DialogController();
e.ShowViewParameters.Controllers.Add(dialogController);
}
开发者ID:kamchung322,项目名称:Namwah,代码行数:27,代码来源:ProdBom_View.cs
示例11: btnLoad_Click
private void btnLoad_Click(object sender, EventArgs e)
{
session = new Session();
ProdOrder prodOrder;
txtProdOrderNo.Text = txtProdOrderNo.Text.Trim().ToUpper();
prodOrder = session.FindObject<ProdOrder>(new BinaryOperator("OrderNo", txtProdOrderNo.Text));
if (prodOrder == null)
{
XtraMessageBox.Show(string.Format("找不到此生产单号 {0} !!", txtProdOrderNo.Text));
clear();
return;
}
txtItemNo.Text = prodOrder.Item.ItemNo;
txtItemName.Text = prodOrder.Item.ItemName;
txtItemType.Text = prodOrder.Item.ItemType.ItemTypeName;
txtStartQty.Text = prodOrder.StartQty.ToString();
txtFinishQty.Text = prodOrder.FinishQty.ToString();
txtWipQty.Text = prodOrder.WipQty.ToString();
prodBomReturns = this.GetProdBomReturnIList(prodOrder);
gridProdOrderReturList.DataSource = prodBomReturns;
XPCollection<WareHouse> wareHouses = new XPCollection<WareHouse>(session);
lookupWarehouse.DataSource = wareHouses;
lookupWarehouse.ValueMember = "This";
lookupWarehouse.DisplayMember = "WarehouseName";
btnPost.Enabled = true;
}
开发者ID:kamchung322,项目名称:Namwah,代码行数:31,代码来源:frmProdOrderReturn.cs
示例12: FrmCrearSubsidio
public FrmCrearSubsidio(Subsidio subsidio, XPCollection xpcSubsidio, UnitOfWork uow)
: this()
{
this.Subsidio = subsidio;
this.uow = uow;
this.xpcSubsidio = xpcSubsidio;
}
开发者ID:jmurataya,项目名称:Nomina,代码行数:7,代码来源:FrmCrearSubsidio.cs
示例13: FrmCrearPuesto
public FrmCrearPuesto(Puesto puesto, XPCollection xpcPuesto, UnitOfWork uow)
: this()
{
this.Puesto = puesto;
this.uow = uow;
this.xpcPuesto = xpcPuesto;
}
开发者ID:jmurataya,项目名称:Nomina,代码行数:7,代码来源:FrmCrearPuesto.cs
示例14: btnAsignar_ItemClick
private void btnAsignar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
PercepcionBase percepcionbase = ((PercepcionBase)xpcPercepcionBase[grdPercepcionBase.FocusedRowHandle]);
XPCollection xpcPercepcionBaseAnidada = new XPCollection(uowAnidada, xpcPercepcionBase, new GroupOperator(GroupOperatorType.And, new BinaryOperator("This", percepcionbase, BinaryOperatorType.Equal)));
if (xpcPercepcionBaseAnidada.Count != 0)
{
PercepcionBase percepcionbase1 = (PercepcionBase)(xpcPercepcionBaseAnidada[0]);
xpcConceptoDetalleAnidada.Filter = new GroupOperator(GroupOperatorType.And, new BinaryOperator("PercepcionBase", percepcionbase1, BinaryOperatorType.Equal),
new BinaryOperator("Concepto", concepto, BinaryOperatorType.Equal));
if (xpcConceptoDetalleAnidada.Count == 0)
{
ConceptoDetalle conceptodetalle = new ConceptoDetalle(uowAnidada);
conceptodetalle.Concepto = concepto;
conceptodetalle.PercepcionBase = percepcionbase1;
// conceptodetalle.Save();
xpcConceptoDetalleAnidada.Add(conceptodetalle);
xpcConceptoDetalleAnidada.Filter = new GroupOperator(GroupOperatorType.And, new BinaryOperator("Concepto", concepto, BinaryOperatorType.Equal));
Close();
}
else
{
XtraMessageBox.Show("La Percepcion Base ya Esta Incluida en el Concepto", "Percepcion Base ya Incluida", MessageBoxButtons.OK, MessageBoxIcon.Error);
xpcConceptoDetalleAnidada.Filter = new GroupOperator(GroupOperatorType.And, new BinaryOperator("Concepto", concepto, BinaryOperatorType.Equal));
Close();
}
}
}
开发者ID:jmurataya,项目名称:Nomina,代码行数:27,代码来源:FrmPercepcionBase.cs
示例15: FrmCrearImpuesto
public FrmCrearImpuesto(Impuesto impuesto, XPCollection xpcImpuesto, UnitOfWork uow)
: this()
{
InitializeComponent();
this.Impuesto = impuesto;
this.uow = uow;
this.xpcImpuesto = xpcImpuesto;
}
开发者ID:jmurataya,项目名称:Nomina,代码行数:8,代码来源:FrmCrearImpuesto.cs
示例16: OnActivated
protected override void OnActivated()
{
base.OnActivated();
subjectAreaCollection = ObjectSpace.CreateObject<XPCollection<SubjectArea>>();
subjectAreaCollection.Load();
PopulateSubjectAreaList();
}
开发者ID:eugene-goldberg,项目名称:DataExplorer,代码行数:9,代码来源:ViewController_Entity_ListView.cs
示例17: OnChanged
protected override void OnChanged(string propertyName, object oldValue, object newValue) {
base.OnChanged(propertyName, oldValue, newValue);
if (propertyName == "ConnectionString") {
try {
_dataTables = new XPCollection<DataTable>(Session, GetStorageTables());
} catch (UnableToOpenDatabaseException) {
}
OnChanged("DataTables");
}
}
开发者ID:aries544,项目名称:eXpand,代码行数:10,代码来源:LogonObject.cs
示例18: SearchConsumItems
/// <summary>
/// 检索消费备注项目列表
/// </summary>
/// <returns></returns>
public XPCollection<t_Consume_Content> SearchConsumItems()
{
GroupOperator groupCriteria = new GroupOperator(
GroupOperatorType.And,
new BinaryOperator("State", 0, BinaryOperatorType.Equal)
);
XPCollection<t_Consume_Content> res = new XPCollection<t_Consume_Content>(theCriteria: groupCriteria);
return res;
}
开发者ID:riveryong,项目名称:shopsoft,代码行数:14,代码来源:ConsumeContentLogic.cs
示例19: SynchronizeTypes
public void SynchronizeTypes( string connectionString) {
var types = new XPCollection<XPObjectType>(new Session { ConnectionString = connectionString });
var xpObjectTypes = types.ToList().Where(objectType => ReflectionHelper.FindType(objectType.TypeName) != null);
var sqlMultiDataStoreProxy = new SqlMultiDataStoreProxy(connectionString);
foreach (var connstring in GetConnectionStrings(sqlMultiDataStoreProxy.DataStoreManager, xpObjectTypes,connectionString)) {
if (connstring!=connectionString) {
SynchronizeTypes(connstring, xpObjectTypes);
}
}
}
开发者ID:gvilas,项目名称:eXpand,代码行数:10,代码来源:TypeSynchronizer.cs
示例20: FrmCuentaContable
public FrmCuentaContable(XPCollection xpcCuentaContable, UnitOfWork uow)
{
InitializeComponent();
this.uow = uow;
this.xpcCuentaContable = xpcCuentaContable;
this.xpcCuentaContable.Session = uow;
RecargarColecciones();
gridCuentaContable.DataSource = this.xpcCuentaContable;
UpdateMenu();
RefreshGrid();
}
开发者ID:jmurataya,项目名称:Nomina,代码行数:11,代码来源:FrmCuentaContable.cs
注:本文中的XPCollection类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论