示例#1
0
        private void BindDropDownCallCycleByFilter()
        {
            foreach (GridViewRow gridViewRow in GridViewResult.Rows)
            {
                HiddenField  hiddenFieldStoreCallCycleId = (HiddenField)gridViewRow.Cells[11].FindControl("HiddenFieldStoreCallCycleId");
                DropDownList dropDownListCallCycle       = (DropDownList)gridViewRow.Cells[2].FindControl("DropDownListCallCycle");

                StoreCallCycle storeCallCycle = StoreCallCycle.GetStoreCallCycleByStoreCallCycleId(Convert.ToInt32(hiddenFieldStoreCallCycleId.Value));
                dropDownListCallCycle.Items.FindByValue(storeCallCycle.CallCycleId.ToString()).Selected = true;
            }
        }
示例#2
0
        private void BindCallCycleByFilter()
        {
            foreach (GridViewRow gridViewRow in GridViewResult.Rows)
            {
                HiddenField  hiddenFieldStoreCallCycleId = (HiddenField)gridViewRow.Cells[11].FindControl("HiddenFieldStoreCallCycleId");
                DropDownList dropDownListCallCycle       = (DropDownList)gridViewRow.Cells[3].FindControl("DropDownListCallCycle");

                StoreCallCycle storeCallCycle = StoreCallCycle.GetStoreCallCycleByStoreCallCycleId(Convert.ToInt32(hiddenFieldStoreCallCycleId.Value));
                dropDownListCallCycle.Items.FindByValue(storeCallCycle.CallCycleId.ToString()).Selected = true;

                if (dropDownListCallCycle.SelectedItem.Text.ToLower() == "week days")
                {
                    RuleWeekDay(gridViewRow.RowIndex);
                }

                if (dropDownListCallCycle.SelectedItem.Text.ToLower() == "week end only")
                {
                    RuleWeekEnd(gridViewRow.RowIndex);
                }

                if (dropDownListCallCycle.SelectedItem.Text.ToLower() == "daily")
                {
                    RuleDaily(gridViewRow.RowIndex);
                }

                //if (dropDownListCallCycle.SelectedItem.Text.ToLower() == "#days per week")
                //{
                //    RuleDaysPerWeek(gridViewRow.RowIndex);
                //}

                //if (dropDownListCallCycle.SelectedItem.Text.ToLower() == "fortnightly")
                //{
                //    RuleFortnightly(gridViewRow.RowIndex);
                //}

                //if (dropDownListCallCycle.SelectedItem.Text.ToLower() == "monthly")
                //{
                //    RuleMonthly(gridViewRow.RowIndex);
                //}
            }
        }