// RDO 11/30/2016 // Inserts a community into lnkBonusPlanToCommunity public void BonusPlanToCommunityInsert() { using (SqlConnection Connection = new SqlConnection(ConfigurationManager.AppSettings["WebApplication"])) { using (SqlCommand Command = new SqlCommand("BonusPlan.BonusPlanToCommunityInsert", Connection)) { Command.CommandType = CommandType.StoredProcedure; Command.CommandTimeout = 600; Command.Parameters.Add("@BonusPlanID", SqlDbType.Int); Command.Parameters["@BonusPlanID"].Value = BonusPlanID; Command.Parameters.Add("@CommunityNumber", SqlDbType.VarChar); Command.Parameters["@CommunityNumber"].Value = CommunityNumber; Command.Parameters.Add("@BeginDt", SqlDbType.VarChar); Command.Parameters["@BeginDt"].Value = BeginDt.NullIfEmpty(); Command.Parameters.Add("@EndDt", SqlDbType.VarChar); Command.Parameters["@EndDt"].Value = EndDt.NullIfEmpty(); Command.Parameters.Add("@Username", SqlDbType.VarChar); Command.Parameters["@Username"].Value = Audit.UserName; Connection.Open(); Command.ExecuteNonQuery(); } } }
public void SetNewOrdersRange(int m = 0) { DateTime dt = DateTime.Now.AddMonths(m); StartDt = GetMonth(dt); EndDt = GetMonth(dt).AddMonths(1).AddDays(-1); UpdateOrders(GetOrdersOfMonth(dt)); Calc.CalkDiscounts(orders.ToList()); DataCatalogsSingleton.Instance.ChangeOrderDateRange(StartDt, EndDt.AddDays(1)); }
public List <OrderFlight> GetOrderFlightsOfMonth(DateTime date) { DateTime fDt = new DateTime(date.Year, date.Month, 1); DateTime eDt = new DateTime(date.AddMonths(1).Year, date.AddMonths(1).Month, 1); List <OrderFlight> flList = new List <OrderFlight>(); if (!dOrders.TryGetValue(fDt, out flList)) { flList = DBProvider.GetOrders(StartDt, EndDt.AddDays(-1), out List <OrderFlight> sVOOrders); dOrders.Add(StartDt, flList); } return(flList); }
public List <DateInfo> Meetings() { return((from a in DbUtil.Db.Attends where a.OrganizationId == OrgId where a.MeetingDate >= Sunday where a.MeetingDate <= EndDt.AddHours(24) where a.Commitment == AttendCommitmentCode.Attending || a.Commitment == AttendCommitmentCode.Substitute group a by a.MeetingDate into g let attend = (from aa in g where aa.PeopleId == PeopleId select aa).SingleOrDefault() select new DateInfo() { attend = attend, MeetingDate = g.Key, count = g.Count(), iscommitted = attend != null }).ToList()); }
public void BonusPlanToUserCommunityInsert() { using (SqlConnection Connection = new SqlConnection(ConfigurationManager.AppSettings["WebApplication"])) { using (SqlCommand Command = new SqlCommand("BonusPlan.BonusPlanToUserCommunityInsert", Connection)) { Command.CommandType = CommandType.StoredProcedure; Command.CommandTimeout = 600; Command.Parameters.Add("@BonusPlanID", SqlDbType.Int); Command.Parameters["@BonusPlanID"].Value = BonusPlanID.NullIfEmpty(); Command.Parameters.Add("@EmployeeID", SqlDbType.Int); Command.Parameters["@EmployeeID"].Value = EmployeeID.NullIfEmpty(); Command.Parameters.Add("@CommunityNumber", SqlDbType.VarChar); Command.Parameters["@CommunityNumber"].Value = CommunityNumber.NullIfEmpty(); Command.Parameters.Add("@Percentage", SqlDbType.VarChar); Command.Parameters["@Percentage"].Value = Percentage.NullIfEmpty(); Command.Parameters.Add("@FlatRate", SqlDbType.VarChar); Command.Parameters["@FlatRate"].Value = FlatRate.NullIfEmpty(); Command.Parameters.Add("@BeginDt", SqlDbType.VarChar); Command.Parameters["@BeginDt"].Value = BeginDt.NullIfEmpty(); Command.Parameters.Add("@EndDt", SqlDbType.VarChar); Command.Parameters["@EndDt"].Value = EndDt.NullIfEmpty(); Command.Parameters.Add("@RollforwardFlg", SqlDbType.Int); Command.Parameters["@RollforwardFlg"].Value = RollforwardFlg.NullIfEmpty("0"); Command.Parameters.Add("@CreateBy", SqlDbType.VarChar); Command.Parameters["@CreateBy"].Value = Audit.CreateBy.NullIfEmpty(); Connection.Open(); Command.ExecuteNonQuery(); } } }
public override int GetHashCode() { int hash = 1; if (EventSn != 0L) { hash ^= EventSn.GetHashCode(); } if (EventType != 0) { hash ^= EventType.GetHashCode(); } if (EventValue.Length != 0) { hash ^= EventValue.GetHashCode(); } if (StartDt.Length != 0) { hash ^= StartDt.GetHashCode(); } if (EndDt.Length != 0) { hash ^= EndDt.GetHashCode(); } if (Checked != false) { hash ^= Checked.GetHashCode(); } if (IAmString.Length != 0) { hash ^= IAmString.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }