예제 #1
0
 private void InitTestEnableSelectMode(out ecnGridView groupGrid, out Panel pnlDownload, out DropDownList archiveFilterDropDown)
 {
     InitCommonShim();
     ShimCustomer.GetByCustomerIDInt32Boolean = (custId, getChild) => new ECN_Framework_Entities.Accounts.Customer();
     ShimClient.HasServiceFeatureInt32EnumsServicesEnumsServiceFeatures = (platform, serviceCode, servicefeatureCode) => true;
     groupGrid = Get <ecnGridView>(_privateGroupExplorerObj, GvGroupsGridId);
     for (var i = 0; i < 12; i++)
     {
         groupGrid.Columns.Add(new TemplateField());
     }
     pnlDownload           = Get <Panel>(_privateGroupExplorerObj, PnlDownloadId);
     archiveFilterDropDown = Get <DropDownList>(_privateGroupExplorerObj, DDLArchiveFilterId);
 }
예제 #2
0
 private void InitTestEnableEditMode(out ecnGridView groupGrid, out Panel pnlSelectGroup, out Button lnkbtnAddGroup, bool userHasAccess = true)
 {
     InitCommonShim();
     ShimCustomer.GetByCustomerIDInt32Boolean = (custId, getChild) => new ECN_Framework_Entities.Accounts.Customer();
     ShimClient.HasServiceFeatureInt32EnumsServicesEnumsServiceFeatures = (platform, serviceCode, servicefeatureCode) => true;
     groupGrid = Get <ecnGridView>(_privateGroupExplorerObj, GvGroupsGridId);
     for (var i = 0; i < 12; i++)
     {
         groupGrid.Columns.Add(new TemplateField());
     }
     pnlSelectGroup = Get <Panel>(_privateGroupExplorerObj, PnlSelectedGroupId);
     lnkbtnAddGroup = Get <Button>(_privateGroupExplorerObj, LnkbtnAddGroupId);
     PlatformFake.ShimUser.HasAccessUserEnumsServicesEnumsServiceFeaturesEnumsAccess = (user, service, code, access) => userHasAccess;
     ShimUser.IsSystemAdministratorUser = (user) => true;
 }
 private void InitilizeContentGrid(ecnGridView gridView)
 {
     gridView.Columns.Add(new TemplateField
     {
         ItemTemplate = new TestTemplateItem {
             control = new Label {
                 ID = "lblFolderName"
             }
         }
     });
     gridView.Columns.Add(new BoundField {
         DataField = "ContentTitle"
     });
     gridView.Columns.Add(new BoundField {
         DataField = "CreatedDate"
     });
     gridView.Columns.Add(new BoundField {
         DataField = "UpdatedDate"
     });
     gridView.Columns.Add(new BoundField {
         DataField = "ContentTypeCode"
     });
     gridView.Columns.Add(new TemplateField
     {
         ItemTemplate = new TestTemplateItem {
             control = new CheckBox {
                 ID = "chkIsValidated"
             }
         }
     });
     gridView.Columns.Add(new TemplateField
     {
         ItemTemplate = new TestTemplateItem {
             control = new System.Web.UI.WebControls.Image {
             }
         }
     });
     gridView.Columns.Add(new HyperLinkField {
     });
     gridView.Columns.Add(new HyperLinkField {
     });
     gridView.Columns.Add(new HyperLinkField {
     });
     gridView.Columns.Add(new TemplateField
     {
         ItemTemplate = new TestTemplateItem {
             control = new System.Web.UI.WebControls.Image {
             }
         }
     });
     gridView.Columns.Add(new TemplateField
     {
         ItemTemplate = new TestTemplateItem {
             control = new LinkButton {
                 ID = "DeleteContentBtn"
             }
         }
     });
     gridView.Columns.Add(new TemplateField
     {
         ItemTemplate = new TestTemplateItem {
             control = new LinkButton {
                 ID = "SelectContentBtn"
             }
         }
     });
     gridView.Columns.Add(new TemplateField
     {
         ItemTemplate = new TestTemplateItem {
             control = new CheckBox {
                 ID = "chkIsArchived"
             }
         }
     });
 }
        private void InitTestGoToPageGroupTextChanged(string searchCriteria, string searchType, out ecnGridView groupsGrid)
        {
            InitCommonShimForTestGroupExplorer();
            var groupList = new List <GroupObject>()
            {
                new GroupObject()
                {
                    GroupID = 1,
                    filters = new List <CommunicatorEntites.CampaignItemBlastFilter>()
                    {
                        new CommunicatorEntites.CampaignItemBlastFilter()
                        {
                            FilterID       = 10,
                            SmartSegmentID = 10,
                            RefBlastIDs    = "RefBlastIDs"
                        }
                    }
                }
            };

            CommFakeDataLayer.ShimCampaignItem.GetSqlCommand = (command) => new CommunicatorEntites.CampaignItem();
            var searchCriteriaText = Get <TextBox>(_privateGroupExplorerObj, SearchCriteriaId);

            searchCriteriaText.Text = searchCriteria;
            ShimDataFunctions.GetDataTableSqlCommandString = (cmd, connString) =>
            {
                if (cmd.CommandText == "v_Group_Get" ||
                    cmd.CommandText == "v_Group_Get_GroupName" ||
                    cmd.CommandText == "v_Group_Get_ProfileName" ||
                    cmd.CommandText == "v_Blast_GetEstimatedSendsCount")
                {
                    var dataTable = new DataTable();
                    dataTable.Columns.Add(new DataColumn("GroupID"));
                    dataTable.Columns.Add(new DataColumn("TotalRecord"));
                    dataTable.Columns.Add(new DataColumn("GroupName"));
                    dataTable.Columns.Add(new DataColumn("Subscribers"));
                    var row = dataTable.NewRow();
                    row[1]             = TotalRecord;
                    row["GroupID"]     = "100";
                    row["GroupName"]   = "GroupName";
                    row["Subscribers"] = "100";
                    dataTable.Rows.Add(row);
                    return(dataTable);
                }
                return(null);
            };
            var searchGrpsDR = Get <DropDownList>(_privateGroupExplorerObj, SearchGrpsDRId);

            searchGrpsDR.Items.Add(new ListItem("searchCriteria", "searchCriteria"));
            searchGrpsDR.SelectedValue = "searchCriteria";
            var searchTypeDR = Get <DropDownList>(_privateGroupExplorerObj, SearchTypeDRId);

            searchTypeDR.Items.Add(new ListItem("Group", "Group"));
            searchTypeDR.Items.Add(new ListItem("Profile", "Profile"));
            searchTypeDR.SelectedValue = searchType;
            ShimCustomer.GetByCustomerIDInt32Boolean = (id, getChild) => new ECN_Framework_Entities.Accounts.Customer()
            {
                BaseChannelID = 1
            };
            groupsGrid = Get <ecnGridView>(_privateGroupExplorerObj, GroupsGridId);
            for (var i = 0; i < 10; i++)
            {
                groupsGrid.Columns.Add(new TemplateField());
            }
        }