本文整理汇总了C#中AppFrame.ObjectCriteria.AddBetweenCriteria方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectCriteria.AddBetweenCriteria方法的具体用法?C# ObjectCriteria.AddBetweenCriteria怎么用?C# ObjectCriteria.AddBetweenCriteria使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppFrame.ObjectCriteria
的用法示例。
在下文中一共展示了ObjectCriteria.AddBetweenCriteria方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: closedPeriodView_LoadClosedPeriodEvent
void closedPeriodView_LoadClosedPeriodEvent(object sender, ClosedPeriodEventArgs e)
{
DateTime fromDay = DateUtility.DateOnly(e.FromDate);
DateTime toDay = DateUtility.DateOnly(e.ToDate);
ObjectCriteria objectCriteria = new ObjectCriteria();
objectCriteria.AddBetweenCriteria("EmployeeMoneyPK.WorkingDay", fromDay,toDay);
IList list = EmployeeMoneyLogic.FindAll(objectCriteria);
e.EmployeeMoneyList = list;
}
示例2: employeeWorkingView_LoadEmployeesWorkingDay
void employeeWorkingView_LoadEmployeesWorkingDay(object sender, EmployeeWorkingsLogicEventArg e)
{
ObjectCriteria wDayCrit = new ObjectCriteria();
wDayCrit.AddEqCriteria("Department.DepartmentId", CurrentDepartment.Get().DepartmentId);
wDayCrit.AddBetweenCriteria("EmployeeWorkingDayPK.WorkingDay", DateUtility.ZeroTime(DateTime.Now),
DateUtility.MaxTime(DateTime.Now));
IList wDayResult = EmployeeWorkingDayLogic.FindAll(wDayCrit);
e.EmployeeWorkingList = wDayResult;
if(wDayResult!=null && wDayResult.Count > 0)
{
foreach (EmployeeWorkingDay workingDay in wDayResult)
{
ObjectCriteria criteria = new ObjectCriteria();
criteria.AddEqCriteria("EmployeePK.EmployeeId", workingDay.EmployeeWorkingDayPK.EmployeeId);
IList list = EmployeeLogic.FindAll(criteria);
workingDay.Employee = (Employee)list[0];
}
}
}
示例3: departmentCostListView_SearchDepartmentCostEvent
void departmentCostListView_SearchDepartmentCostEvent(object sender, DepartmentCostEventArgs e)
{
if(e.FromDate == DateTime.MinValue && e.ToDate == DateTime.MinValue)
{
ObjectCriteria objectCriteria = new ObjectCriteria();
objectCriteria.AddBetweenCriteria("DepartmentCostPK.CostDate", DateUtility.ZeroTime(DateTime.Now),
DateUtility.MaxTime(DateTime.Now));
objectCriteria.AddEqCriteria("DepartmentCostPK.DepartmentId", CurrentDepartment.Get().DepartmentId);
IList list = DepartmentCostLogic.FindAll(objectCriteria);
e.CostList = list;
}
}
示例4: mainStockOutReportView_LoadConfirmingStockOutsEvent
void mainStockOutReportView_LoadConfirmingStockOutsEvent(object sender, StockOutConfirmEventArgs e)
{
DateTime startTime = DateUtility.ZeroTime(e.ReportDateStockOutParam.FromDate);
DateTime endTime = DateUtility.MaxTime(e.ReportDateStockOutParam.ToDate);
ObjectCriteria objectCriteria = new ObjectCriteria();
objectCriteria.AddEqCriteria("DelFlg", 0);
objectCriteria.AddEqCriteria("ConfirmFlg", 1);
objectCriteria.AddBetweenCriteria("StockOutDate", startTime, endTime);
IList stockOutList = StockOutLogic.FindAll(objectCriteria);
e.ResultStockOutList = stockOutList;
}
示例5: reportStockOutView_LoadDepartmentStockOutByRangeEvent
void reportStockOutView_LoadDepartmentStockOutByRangeEvent(object sender, ReportStockOutEventArgs e)
{
ObjectCriteria criteria = new ObjectCriteria();
criteria.AddBetweenCriteria("CreateDate", e.ReportDateStockOutParam.FromDate, e.ReportDateStockOutParam.ToDate);
criteria.AddEqCriteria("DepartmentStockInPK.DepartmentId", e.SelectDepartment.DepartmentId);
IList stockInList = DepartmentStockInLogic.FindAll(criteria);
e.ResultStockOutList = stockInList;
IList productMasterList = DepartmentStockInLogic.FindByProductMaster(e.SelectDepartment.DepartmentId, e.ReportDateStockOutParam.FromDate, e.ReportDateStockOutParam.ToDate);
e.ProductMastersInList = productMasterList;
}
示例6: reportStockInView_LoadStockInByRangeEvent
void reportStockInView_LoadStockInByRangeEvent(object sender, ReportStockInEventArgs e)
{
ObjectCriteria criteria = new ObjectCriteria();
criteria.AddBetweenCriteria("CreateDate", e.ReportStockInParam.FromDate, e.ReportStockInParam.ToDate);
IList stockInList = StockInLogic.FindAll(criteria);
e.ResultStockInList = stockInList;
IList productMasterList = StockInLogic.FindByProductMaster(e.ReportStockInParam.FromDate, e.ReportStockInParam.ToDate);
e.ProductMastersInList = productMasterList;
}
示例7: employeeWorkingView_SaveEmployeeWorkingDay
void employeeWorkingView_SaveEmployeeWorkingDay(object sender, EmployeeWorkingsLogicEventArg e)
{
string barCode = e.EmployeeId;
ObjectCriteria criteria = new ObjectCriteria();
criteria.AddEqCriteria("Barcode", barCode);
IList list = EmployeeInfoLogic.FindAll(criteria);
if (list != null && list.Count == 1)
{
EmployeeInfo info = (EmployeeInfo)list[0];
EmployeeWorkingDay workingDay = e.EmployeeWorkingDay;
if (workingDay == null)
{
workingDay = new EmployeeWorkingDay();
workingDay.CreateDate = DateTime.Now;
workingDay.CreateId = ClientInfo.getInstance().LoggedUser.Name;
workingDay.UpdateDate = DateTime.Now;
workingDay.UpdateId = ClientInfo.getInstance().LoggedUser.Name;
//workingDay.StartTime = DateTime.Now;
workingDay.EndTime = DateTime.MinValue;
workingDay.EmployeeWorkingDayPK = new EmployeeWorkingDayPK
{
//DepartmentId = CurrentDepartment.Get().DepartmentId,
EmployeeId = info.EmployeePK.EmployeeId,
WorkingDay = DateTime.Now
};
workingDay.Employee = info.Employee;
workingDay.Department = CurrentDepartment.Get();
workingDay.DelFlg = 0;
workingDay.ExclusiveKey = 1;
}
ObjectCriteria wDayCrit = new ObjectCriteria();
wDayCrit.AddEqCriteria("Department.DepartmentId", workingDay.Department.DepartmentId);
wDayCrit.AddEqCriteria("EmployeeWorkingDayPK.EmployeeId", workingDay.EmployeeWorkingDayPK.EmployeeId);
wDayCrit.AddBetweenCriteria("EmployeeWorkingDayPK.WorkingDay", DateUtility.ZeroTime(DateTime.Now),
DateUtility.MaxTime(DateTime.Now));
IList wDayResult = EmployeeWorkingDayLogic.FindAll(wDayCrit);
if (wDayResult == null || wDayResult.Count == 0)
{
workingDay.StartTime = DateTime.Now;
EmployeeWorkingDayLogic.Add(workingDay);
}
else
{
EmployeeWorkingDay currWDay = (EmployeeWorkingDay) wDayResult[0];
currWDay.EndTime = DateTime.Now;
workingDay.EndTime = currWDay.EndTime;
EmployeeWorkingDayLogic.Update(currWDay);
}
e.EmployeeWorkingDay = workingDay;
e.HasErrors = false;
}
else
{
e.HasErrors = true;
throw new BusinessException("Mã vạch của nhân viên không đúng");
}
}