public void SetSubOrder() { tblSubOrder objSubOrder = new tblSubOrder(); objSubOrder.Where.AppSubOrderStatusID.Value = Convert.ToInt32(Enums.Enums_OrderStatus.Ordered); objSubOrder.Query.Load(); lblOrdered.Text = objSubOrder.RowCount.ToString(); objSubOrder = null; objSubOrder = new tblSubOrder(); objSubOrder.Where.AppSubOrderStatusID.Value = Convert.ToInt32(Enums.Enums_OrderStatus.Confirmed); objSubOrder.Query.Load(); lblConfirmed.Text = objSubOrder.RowCount.ToString(); objSubOrder = null; objSubOrder = new tblSubOrder(); objSubOrder.Where.AppSubOrderStatusID.Value = Convert.ToInt32(Enums.Enums_OrderStatus.ReadyToShip); objSubOrder.Query.Load(); lblReadyToShip.Text = objSubOrder.RowCount.ToString(); objSubOrder = null; objSubOrder = new tblSubOrder(); objSubOrder.Where.AppSubOrderStatusID.Value = Convert.ToInt32(Enums.Enums_OrderStatus.Shipped); objSubOrder.Query.Load(); lblShipped.Text = objSubOrder.RowCount.ToString(); objSubOrder = null; objSubOrder = new tblSubOrder(); objDataTable = objSubOrder.GetTotalPriceDayWise(Convert.ToInt32(Enums.Enums_OrderStatus.Returned).ToString() + "," + Convert.ToInt32(Enums.Enums_OrderStatus.CancelledByCustomer).ToString() + "," + Convert.ToInt32(Enums.Enums_OrderStatus.CancelledByAdmin).ToString() + "," + Convert.ToInt32(Enums.Enums_OrderStatus.Confirmed).ToString(), GetDateTime().AddDays(-1).ToString(), GetDateTime().ToString()); if (objDataTable.Rows.Count > 0) { lblLastDayOrder.Text = objDataTable.Rows[0]["appTotalOrder"].ToString(); lblLastDayOrderRupees.Text = objDataTable.Rows[0]["appTotalOrderPrice"].ToString(); } objDataTable = null; objDataTable = objSubOrder.GetTotalPriceDayWise(Convert.ToInt32(Enums.Enums_OrderStatus.Returned).ToString() + "," + Convert.ToInt32(Enums.Enums_OrderStatus.CancelledByCustomer).ToString() + "," + Convert.ToInt32(Enums.Enums_OrderStatus.CancelledByAdmin).ToString() + "," + Convert.ToInt32(Enums.Enums_OrderStatus.Confirmed).ToString(), GetDateTime().AddDays(-7).ToString(), GetDateTime().ToString()); if (objDataTable.Rows.Count > 0) { lblLastWeekOrder.Text = objDataTable.Rows[0]["appTotalOrder"].ToString(); lblLastWeekOrderRupees.Text = objDataTable.Rows[0]["appTotalOrderPrice"].ToString(); } objDataTable = null; objDataTable = objSubOrder.GetTotalPriceDayWise(Convert.ToInt32(Enums.Enums_OrderStatus.Returned).ToString() + "," + Convert.ToInt32(Enums.Enums_OrderStatus.CancelledByCustomer).ToString() + "," + Convert.ToInt32(Enums.Enums_OrderStatus.CancelledByAdmin).ToString() + "," + Convert.ToInt32(Enums.Enums_OrderStatus.Confirmed).ToString(), GetDateTime().AddMonths(-1).ToString(), GetDateTime().ToString()); if (objDataTable.Rows.Count > 0) { lblLastMonthOrder.Text = objDataTable.Rows[0]["appTotalOrder"].ToString(); lblLastMonthOrderRupees.Text = objDataTable.Rows[0]["appTotalOrderPrice"].ToString(); } objDataTable = null; objDataTable = objSubOrder.GetTotalPriceDayWise(Convert.ToInt32(Enums.Enums_OrderStatus.Returned).ToString() + "," + Convert.ToInt32(Enums.Enums_OrderStatus.CancelledByCustomer).ToString() + "," + Convert.ToInt32(Enums.Enums_OrderStatus.CancelledByAdmin).ToString() + "," + Convert.ToInt32(Enums.Enums_OrderStatus.Confirmed).ToString(), GetDateTime().AddMonths(-1).ToString(), GetDateTime().ToString()); if (objDataTable.Rows.Count > 0) { lblLastYearOrder.Text = objDataTable.Rows[0]["appTotalOrder"].ToString(); lblLastYearOrderRupees.Text = objDataTable.Rows[0]["appTotalOrderPrice"].ToString(); } objSubOrder = null; }