Ejemplo n.º 1
0
        protected void dlKmlPlaceMarks_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.SelectedItem)
            {
                GridView grdList = (GridView)e.Item.FindControl("grdList");
                ListMaster objListMaster = new ListMaster(ConnectionString);
                DataTable dtLists = objListMaster.getAllListsWithMembersCount("ListName", "ASC");

                grdList.DataSource = dtLists;
                grdList.DataBind();
            }
        }
Ejemplo n.º 2
0
        protected void bindGrid()
        {
            try
            {

                ListMaster objListMaster = new ListMaster(ConnectionString);
                DataTable dtLists = objListMaster.getAllListsWithMembersCount("ListName", "ASC");

                dlList.DataSource = dtLists;
                dlList.DataBind();

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// To bind List grid
 /// </summary>
 /// <param name="fillFlag"></param>
 /// <param name="_sortdir"></param>
 /// <param name="_gridSortExp"></param>
 protected void bindGrid(string fillFlag, string _sortdir, string _gridSortExp)
 {
     try
     {
         string sortdir = (fillFlag == "sort" ? GetSortDirection() : GridViewSortDirection);
         if (flagreset == true)
         {
             sortdir = "ASC";
             GridSortExpression = "ListName";
         }
         ListMaster objListMaster = new ListMaster(ConnectionString);
         DataTable dtLists = objListMaster.getAllListsWithMembersCount(GridSortExpression, sortdir);
         if (dtLists.Rows.Count > 0)
         {
             grdList.DataSource = dtLists;
             grdList.DataBind();
             GridPrevSortExpression = GridSortExpression;
         }
         udpnlListGridview.Update();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 4
0
        public XmlDocument GetAllLists(string UserID, string Password)
        {
            XmlDocument doc = new System.Xml.XmlDocument();
            string Con = GetConnectionString(UserID, Password);
            ListMaster objListMaster = new ListMaster(Con);
            DataTable dtLists = objListMaster.getAllListsWithMembersCount("ListMasterID", "asc");
            StringBuilder str = new StringBuilder();
            str.Append("<ListsInfo>");
            if (dtLists != null)
            {
                for (int i = 0; i < dtLists.Rows.Count; i++)
                {
                    str.Append("<List Row=\"" + i.ToString() + "\"> ");
                    str.Append("<ListMasterID>" + dtLists.Rows[i]["ListMasterID"].ToString() + "</ListMasterID> ");
                    str.Append(" <ListName>" + dtLists.Rows[i]["ListName"].ToString() + "</ListName>");
                    //str.Append(" <ListDesc>" + dtLists.Rows[i]["ListDesc"].ToString() + "</ListDesc>");

                    if (string.IsNullOrEmpty(dtLists.Rows[i]["ListDesc"].ToString()))
                        str.Append("<ListDesc>" + string.Empty + "</ListDesc>");
                    else
                        str.Append("<ListDesc>" + Server.HtmlEncode(dtLists.Rows[i]["ListDesc"].ToString()) + "</ListDesc>");

                    str.Append(" <ListCowner>" + dtLists.Rows[i]["ListCowner"].ToString() + "</ListCowner>");
                    str.Append(" <AllMembers>" + dtLists.Rows[i]["AllMembers"].ToString() + "</AllMembers>");
                    str.Append(" <ValidMembers>" + dtLists.Rows[i]["ValidMembers"].ToString() + "</ValidMembers>");
                    str.Append(" <CreatedDate>" + Convert.ToDateTime(dtLists.Rows[i]["CreatedDate"]).ToString() + "</CreatedDate>");
                    str.Append("<Errormessage></Errormessage>");
                    str.Append("</List>");
                    string ss = str.ToString();
                }
            }
            else
            {
                str.Append("<Message> Please Enter Valid Inputs</Message>");
            }
            str.Append("</ListsInfo>");
            doc.LoadXml(str.ToString());
            return doc;
        }
Ejemplo n.º 5
0
 private void bindGridto()
 {
     try
     {
         ListMaster objListMaster = new ListMaster(ConnectionString);
         DataTable dtLists = objListMaster.getAllListsWithMembersCount("CreatedDate", "desc");
         dtLists.AsEnumerable().ToList().ForEach(delegate(DataRow row) { if (row["ListName"].ToString().Contains("&quot;")) row["ListName"] = Server.HtmlEncode(row["ListName"].ToString()); });
         GrdList2.DataSource = dtLists;
         GrdList2.DataBind();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 6
0
 protected void bindGrid(string fillFlag, string _sortdir, string _gridSortExp)
 {
     try
     {
         string sortdir = (fillFlag == "sort" ? GetSortDirection() : GridViewSortDirection);
         // to display listname wise sorting whenever a list gets created or removed
         if (!_gridSortExp.Equals(string.Empty))
         {
             sortdir = _sortdir;
             GridSortExpression = _gridSortExp;
         }
         ListMaster objListMaster = new ListMaster(ConnectionString);
         DataTable dtLists = objListMaster.getAllListsWithMembersCount(GridSortExpression, sortdir);
         //to sort
         grdList1.DataSource = dtLists;
         GrdList2.DataSource = dtLists;
         grdList1.DataBind();
         GrdList2.DataBind();
         // if grid has no records then disable the remove button
         udpnlGrid1.Update();
         udpnlGrid2.Update();
         GridPrevSortExpression = GridSortExpression;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 7
0
        private void buildSegmentFromLists(string fillFlag, int pageIndex)
        {
            try
            {

                string sortdir = (fillFlag == "sort" ? GetSortDirection() : GridViewSortDirection);

                if (flagreset == true)
                {
                    sortdir = "ASC";
                    GridSortExpression = "ListName";
                }
                ListMaster objListMaster = new ListMaster(ConnectionString);
                DataTable dtLists = objListMaster.getAllListsWithMembersCount(GridSortExpression, sortdir);

                if (hdfListId.Value != "")
                {
                    DataRow[] dataRow = dtLists.Select("ListMasterId=" + hdfListId.Value);
                    dtLists.Rows.Remove(dataRow[0]);
                }
                if (dtLists.Rows.Count > 0)
                {
                    rgdList.DataSource = dtLists;
                    rgdList.CurrentPageIndex = pageIndex;
                    rgdList.DataBind();
                    GridPrevSortExpression = GridSortExpression;
                }
                lblMember.Text = "";
                lblListsSelected.Text = "";

                divListFiletr.Style.Add("display", "none");
                divCampaigns.Style.Add("display", "none");
                divCampaignFilter.Style.Add("display", "none");
                divLists.Style.Add("display", "block");

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }