protected void btnExport_Click(object sender, EventArgs e) { _userGroupEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _userGroupEntity.LogMessages.Userid = UserSession.Current.UserAccount; _userGroupEntity.LogMessages.Username = UserSession.Current.UserDspName; _userGroupEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _userGroupEntity.UserGroupDBEntity = new List<UserGroupDBEntity>(); UserGroupDBEntity userGroupDBEntity = new UserGroupDBEntity(); userGroupDBEntity.UserGroupID = hidUserGroupID.Value; _userGroupEntity.UserGroupDBEntity.Add(userGroupDBEntity); DataSet dsResult = new DataSet(); dsResult = UserGroupBP.UserDetailListSelect(_userGroupEntity).QueryResult; CommonFunction.ExportExcelForLM(dsResult); }
protected void btnSave_Click(object sender, EventArgs e) { //ProgressBar1.Value = 50; messageContent.InnerHtml = ""; if (String.IsNullOrEmpty(txtUserGroupNM.Value.ToString().Trim()) || String.IsNullOrEmpty(txtUserGroupNM.Value.ToString().Trim())) { messageContent.InnerHtml = GetLocalResourceObject("Error3").ToString(); //UpdatePanel2.Update(); return; } if (!checkNum(txtSubmitOrderFrom.Value.ToString().Trim()) || !checkNum(txtSubmitOrderTo.Value.ToString().Trim()) || !checkNum(txtCompleteOrderFrom.Value.ToString().Trim()) || !checkNum(txtCompleteOrderTo.Value.ToString().Trim())) { messageContent.InnerHtml = GetLocalResourceObject("Error4").ToString(); return; } if ((!String.IsNullOrEmpty(txtSubmitOrderFrom.Value.ToString().Trim()) && !String.IsNullOrEmpty(txtSubmitOrderTo.Value.ToString().Trim())) && (int.Parse(txtSubmitOrderFrom.Value.ToString().Trim()) > int.Parse(txtSubmitOrderTo.Value.ToString().Trim()))) { messageContent.InnerHtml = GetLocalResourceObject("Error6").ToString(); return; } if ((!String.IsNullOrEmpty(txtCompleteOrderFrom.Value.ToString().Trim()) && !String.IsNullOrEmpty(txtCompleteOrderTo.Value.ToString().Trim())) && (int.Parse(txtCompleteOrderFrom.Value.ToString().Trim()) > int.Parse(txtCompleteOrderTo.Value.ToString().Trim()))) { messageContent.InnerHtml = GetLocalResourceObject("Error7").ToString(); return; } _userGroupEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _userGroupEntity.LogMessages.Userid = UserSession.Current.UserAccount; _userGroupEntity.LogMessages.Username = UserSession.Current.UserDspName; _userGroupEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _userGroupEntity.UserGroupDBEntity = new List<UserGroupDBEntity>(); UserGroupDBEntity usergroupEntity = new UserGroupDBEntity(); usergroupEntity.UserGroupNM = txtUserGroupNM.Value.ToString().Trim(); usergroupEntity.RegChannelList = hidRegChannelList.Value.ToString().Trim(); usergroupEntity.PlatformList = hidPlatformList.Value.ToString().Trim(); usergroupEntity.RegistStart = dpRegistStart.Value; usergroupEntity.RegistEnd = dpRegistEnd.Value; usergroupEntity.LoginStart = dpLoginStart.Value; usergroupEntity.LoginEnd = dpLoginEnd.Value; usergroupEntity.SubmitOrderFrom = txtSubmitOrderFrom.Value.ToString().Trim(); usergroupEntity.SubmitOrderTo = txtSubmitOrderTo.Value.ToString().Trim(); usergroupEntity.CompleteOrderFrom = txtCompleteOrderFrom.Value.ToString().Trim(); usergroupEntity.CompleteOrderTo = txtCompleteOrderTo.Value.ToString().Trim(); usergroupEntity.LastOrderStart = dpLastOrderStart.Value; usergroupEntity.LastOrderEnd = dpLastOrderEnd.Value; usergroupEntity.ManualAdd = txtManualAdd.Text.ToString().Trim(); _userGroupEntity.UserGroupDBEntity.Add(usergroupEntity); int iResult = UserGroupBP.Insert(_userGroupEntity); _commonEntity.LogMessages = _userGroupEntity.LogMessages; _commonEntity.CommonDBEntity = new List<CommonDBEntity>(); CommonDBEntity commonDBEntity = new CommonDBEntity(); commonDBEntity.Event_Type = "新建用户组-添加"; commonDBEntity.Event_ID = txtUserGroupNM.Value.ToString().Trim(); string conTent = GetLocalResourceObject("EventInsertMessage").ToString(); conTent = string.Format(conTent, txtUserGroupNM.Value, ""); commonDBEntity.Event_Content = conTent; if (iResult == 1) { commonDBEntity.Event_Result = GetLocalResourceObject("InsertSuccess").ToString(); messageContent.InnerHtml = GetLocalResourceObject("InsertSuccess").ToString(); } else if (iResult == 2) { commonDBEntity.Event_Result = GetLocalResourceObject("Error1").ToString(); messageContent.InnerHtml = GetLocalResourceObject("Error1").ToString(); } else if (iResult == 3) { string errTent = GetLocalResourceObject("Error5").ToString(); errTent = string.Format(errTent, (_userGroupEntity.UserGroupDBEntity.Count > 0 ) ? _userGroupEntity.UserGroupDBEntity[0].ErrManualAdd : ""); commonDBEntity.Event_Result = errTent; messageContent.InnerHtml = errTent; } else { commonDBEntity.Event_Result = GetLocalResourceObject("Error2").ToString(); messageContent.InnerHtml = GetLocalResourceObject("Error2").ToString(); } _commonEntity.CommonDBEntity.Add(commonDBEntity); int maxLength = String.IsNullOrEmpty(ConfigurationManager.AppSettings["MaxLengthCount"]) ? 500 : int.Parse(ConfigurationManager.AppSettings["MaxLengthCount"].ToString()); if (iResult == 1 || iResult == 3) { DataSet dsHistory = UserGroupBP.GetHistoryInsert(_userGroupEntity); if (dsHistory.Tables.Count > 0 && dsHistory.Tables[0].Rows.Count > 0) { int iCount = 0; string phoneString = ""; foreach (DataRow drRow in dsHistory.Tables[0].Rows) { phoneString = phoneString + drRow[0].ToString() + ","; iCount = iCount + 1; if (iCount == maxLength) { phoneString = phoneString.Substring(0, phoneString.Length - 1); conTent = GetLocalResourceObject("EventInsertMessage").ToString(); conTent = string.Format(conTent, txtUserGroupNM.Value, phoneString); _commonEntity.CommonDBEntity[0].Event_Content = conTent; CommonBP.InsertEventHistory(_commonEntity); phoneString = ""; iCount = 0; } } if (iCount > 0) { phoneString = phoneString.Substring(0, phoneString.Length - 1); conTent = GetLocalResourceObject("EventInsertMessage").ToString(); conTent = string.Format(conTent, txtUserGroupNM.Value, phoneString); _commonEntity.CommonDBEntity[0].Event_Content = conTent; CommonBP.InsertEventHistory(_commonEntity); } } else { conTent = GetLocalResourceObject("EventInsertMessage").ToString(); conTent = string.Format(conTent, txtUserGroupNM.Value, ""); _commonEntity.CommonDBEntity[0].Event_Content = conTent; CommonBP.InsertEventHistory(_commonEntity); } } else { //_commonEntity.CommonDBEntity.Add(commonDBEntity); CommonBP.InsertEventHistory(_commonEntity); } hidRegChannelList.Value = ""; hidPlatformList.Value = ""; BindUserGroupListGrid(); //UpdatePanel1.Update(); //ProgressBar1.Value = 100; }
//protected void btnAddUserGroup_Click(object sender, EventArgs e) //{ // //btnAddChannel(); // //BindChanelListGrid(); // string RergChannleList = hidRegChannelList.Value; // foreach (ListItem li in chkPlatformList.Items) // { // if (li.Selected) // { // } // } //} //[WebMethod] //public static string AddUserGroup(string parm) //{ // AddUserGroupList(); // return "123--->456"; //} //private static string AddUserGroupList() //{ // return ""; //} //[System.Web.Services.WebMethod] //public static string GetDataTable() //{ // return DataTable2Json(CreateDataTable()); //} //public static System.Data.DataTable CreateDataTable() //{ // System.Data.DataTable dataTable1 = new System.Data.DataTable("BlogUser"); // System.Data.DataRow dr; // dataTable1.Columns.Add(new System.Data.DataColumn("UserId", typeof(System.Int32))); // dataTable1.Columns.Add(new System.Data.DataColumn("UserName", typeof(System.String))); // dataTable1.PrimaryKey = new System.Data.DataColumn[] { dataTable1.Columns["UserId"] }; // for (int i = 0; i < 8; i++) // { // dr = dataTable1.NewRow(); // dr[0] = i; // dr[1] = "【孟子E章】" + i.ToString() + " 前端传递的参数的值分别是:";//<script>alert('123')</script> // dataTable1.Rows.Add(dr); // } // return dataTable1; //} //public static string DataTable2Json(System.Data.DataTable dt) //{ // StringBuilder jsonBuilder = new StringBuilder(); // jsonBuilder.Append("{\""); // jsonBuilder.Append(dt.TableName.ToString()); // jsonBuilder.Append("\":["); // for (int i = 0; i < dt.Rows.Count; i++) // { // jsonBuilder.Append("{"); // for (int j = 0; j < dt.Columns.Count; j++) // { // jsonBuilder.Append("\""); // jsonBuilder.Append(dt.Columns[j].ColumnName); // jsonBuilder.Append("\":\""); // jsonBuilder.Append(dt.Rows[i][j].ToString()); // jsonBuilder.Append("\","); // } // jsonBuilder.Remove(jsonBuilder.Length - 1, 1); // jsonBuilder.Append("},"); // } // jsonBuilder.Remove(jsonBuilder.Length - 1, 1); // jsonBuilder.Append("]"); // jsonBuilder.Append("}"); // return jsonBuilder.ToString(); //} //[WebMethod] //public static void dddddddaaaaaa() //{ // string RergChannleList = ""; //} //protected void btnAddRegChannel_Click(object sender, EventArgs e) //{ //LinkButton lkbtn = new LinkButton(); //lkbtn.Text = ddpRegChannelList.SelectedItem.ToString(); //lkbtn.ID = "lkbtn_" + ddpRegChannelList.SelectedValue.ToString(); //lkbtn.Click //dvRegChannelList.Controls.Remove(); //dvRegChannelList.Controls.Add(lkbtn); //btnAddChannel(); //BindChanelListGrid(); //} ////清除控件中的数据 //private void clearValue() //{ //} ////发放渠道 private void BindUserGroupListGrid() { _userGroupEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _userGroupEntity.LogMessages.Userid = UserSession.Current.UserAccount; _userGroupEntity.LogMessages.Username = UserSession.Current.UserDspName; _userGroupEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _userGroupEntity.UserGroupDBEntity = new List<UserGroupDBEntity>(); UserGroupDBEntity usergroupEntity = new UserGroupDBEntity(); DataSet dsResult = UserGroupBP.CreateUserSelect(_userGroupEntity).QueryResult; gridViewCSCreateUserGroupList.DataSource = dsResult.Tables[0].DefaultView; gridViewCSCreateUserGroupList.DataKeyNames = new string[] { "ID" };//主键 gridViewCSCreateUserGroupList.DataBind(); }
//protected void btnAddUserGroup_Click(object sender, EventArgs e) //{ // //btnAddChannel(); // //BindChanelListGrid(); // string RergChannleList = hidRegChannelList.Value; // foreach (ListItem li in chkPlatformList.Items) // { // if (li.Selected) // { // } // } //} //[WebMethod] //public static string AddUserGroup(string parm) //{ // AddUserGroupList(); // return "123--->456"; //} //private static string AddUserGroupList() //{ // return ""; //} //[System.Web.Services.WebMethod] //public static string GetDataTable() //{ // return DataTable2Json(CreateDataTable()); //} //public static System.Data.DataTable CreateDataTable() //{ // System.Data.DataTable dataTable1 = new System.Data.DataTable("BlogUser"); // System.Data.DataRow dr; // dataTable1.Columns.Add(new System.Data.DataColumn("UserId", typeof(System.Int32))); // dataTable1.Columns.Add(new System.Data.DataColumn("UserName", typeof(System.String))); // dataTable1.PrimaryKey = new System.Data.DataColumn[] { dataTable1.Columns["UserId"] }; // for (int i = 0; i < 8; i++) // { // dr = dataTable1.NewRow(); // dr[0] = i; // dr[1] = "【孟子E章】" + i.ToString() + " 前端传递的参数的值分别是:";//<script>alert('123')</script> // dataTable1.Rows.Add(dr); // } // return dataTable1; //} //public static string DataTable2Json(System.Data.DataTable dt) //{ // StringBuilder jsonBuilder = new StringBuilder(); // jsonBuilder.Append("{\""); // jsonBuilder.Append(dt.TableName.ToString()); // jsonBuilder.Append("\":["); // for (int i = 0; i < dt.Rows.Count; i++) // { // jsonBuilder.Append("{"); // for (int j = 0; j < dt.Columns.Count; j++) // { // jsonBuilder.Append("\""); // jsonBuilder.Append(dt.Columns[j].ColumnName); // jsonBuilder.Append("\":\""); // jsonBuilder.Append(dt.Rows[i][j].ToString()); // jsonBuilder.Append("\","); // } // jsonBuilder.Remove(jsonBuilder.Length - 1, 1); // jsonBuilder.Append("},"); // } // jsonBuilder.Remove(jsonBuilder.Length - 1, 1); // jsonBuilder.Append("]"); // jsonBuilder.Append("}"); // return jsonBuilder.ToString(); //} //[WebMethod] //public static void dddddddaaaaaa() //{ // string RergChannleList = ""; //} //protected void btnAddRegChannel_Click(object sender, EventArgs e) //{ //LinkButton lkbtn = new LinkButton(); //lkbtn.Text = ddpRegChannelList.SelectedItem.ToString(); //lkbtn.ID = "lkbtn_" + ddpRegChannelList.SelectedValue.ToString(); //lkbtn.Click //dvRegChannelList.Controls.Remove(); //dvRegChannelList.Controls.Add(lkbtn); //btnAddChannel(); //BindChanelListGrid(); //} ////清除控件中的数据 //private void clearValue() //{ //} private void BindReviewUserGroupListGrid() { messageContent.InnerHtml = ""; if (!checkNum(txtUserCountFrom.Value.Trim()) || !checkNum(txtUserCountTo.Value.Trim())) { messageContent.InnerHtml = GetLocalResourceObject("ErrorNum").ToString(); return; } if ((!String.IsNullOrEmpty(txtUserCountFrom.Value.ToString().Trim()) && !String.IsNullOrEmpty(txtUserCountTo.Value.ToString().Trim())) && (int.Parse(txtUserCountFrom.Value.ToString().Trim()) > int.Parse(txtUserCountTo.Value.ToString().Trim()))) { messageContent.InnerHtml = GetLocalResourceObject("Error1").ToString(); return; } _userGroupEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _userGroupEntity.LogMessages.Userid = UserSession.Current.UserAccount; _userGroupEntity.LogMessages.Username = UserSession.Current.UserDspName; _userGroupEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _userGroupEntity.UserGroupDBEntity = new List<UserGroupDBEntity>(); UserGroupDBEntity usergroupEntity = new UserGroupDBEntity(); usergroupEntity.UserGroupNM = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["UserGroupNM"].ToString())) ? null : ViewState["UserGroupNM"].ToString(); usergroupEntity.StartDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["StartDTime"].ToString())) ? null : ViewState["StartDTime"].ToString(); ; usergroupEntity.EndDTime = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["EndDTime"].ToString())) ? null : ViewState["EndDTime"].ToString(); ; usergroupEntity.StartCount = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["StartCount"].ToString())) ? null : ViewState["StartCount"].ToString(); ; usergroupEntity.EndCount = (ViewState.Count == 0 || String.IsNullOrEmpty(ViewState["EndCount"].ToString())) ? null : ViewState["EndCount"].ToString(); ; _userGroupEntity.UserGroupDBEntity.Add(usergroupEntity); DataSet dsResult = UserGroupBP.ReviewSelect(_userGroupEntity).QueryResult; gridViewCSReviewUserGroupList.DataSource = dsResult.Tables[0].DefaultView; gridViewCSReviewUserGroupList.DataKeyNames = new string[] { "ID" };//主键 gridViewCSReviewUserGroupList.DataBind(); }
private void BindViewCSUserGroupListDetail() { _userGroupEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _userGroupEntity.LogMessages.Userid = UserSession.Current.UserAccount; _userGroupEntity.LogMessages.Username = UserSession.Current.UserDspName; _userGroupEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _userGroupEntity.UserGroupDBEntity = new List<UserGroupDBEntity>(); UserGroupDBEntity userGroupDBEntity = new UserGroupDBEntity(); userGroupDBEntity.UserGroupID = hidUserGroupID.Value; _userGroupEntity.UserGroupDBEntity.Add(userGroupDBEntity); DataSet dsDetailResult = UserGroupBP.UserDetailListSelect(_userGroupEntity).QueryResult; gridViewCSUserGroupListDetail.DataSource = dsDetailResult.Tables[0].DefaultView; gridViewCSUserGroupListDetail.DataKeyNames = new string[] { "loginmobile" };//主键 gridViewCSUserGroupListDetail.DataBind(); }
//public DataSet ddlOnlinebind() //{ // DataSet dsResult = CommonBP.GetConfigList(GetLocalResourceObject("OnlineType").ToString()); // DataTable dtResult = new DataTable(); // dtResult.Columns.Add("ONLINESTATUS"); // dtResult.Columns.Add("ONLINEDIS"); // if (dsResult.Tables.Count > 0) // { // dsResult.Tables[0].Columns["Key"].ColumnName = "ONLINESTATUS"; // dsResult.Tables[0].Columns["Value"].ColumnName = "ONLINEDIS"; // } // return dsResult; //} //private void BindRegChannelDDL() //{ // _userGroupEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); // _userGroupEntity.LogMessages.Userid = "test"; // _userGroupEntity.LogMessages.Username = "******"; // DataSet dsResult = UserGroupBP.GetRegChannelList(_userGroupEntity).QueryResult; // ddpRegChannelList.DataTextField = "REGCHANELNM"; // ddpRegChannelList.DataValueField = "REGCHANELCODE"; // ddpRegChannelList.DataSource = dsResult; // ddpRegChannelList.DataBind(); // DataSet dsPlatFormResult = UserGroupBP.GetPlatFormList(_userGroupEntity).QueryResult; // chkPlatformList.DataTextField = "PLATFORMNM"; // chkPlatformList.DataValueField = "PLATFORMCODE"; // chkPlatformList.DataSource = dsPlatFormResult; // chkPlatformList.DataBind(); //} //protected void btnAddUserGroup_Click(object sender, EventArgs e) //{ // //btnAddChannel(); // //BindChanelListGrid(); // string RergChannleList = hidRegChannelList.Value; // foreach (ListItem li in chkPlatformList.Items) // { // if (li.Selected) // { // } // } //} //[WebMethod] //public static string HelloWorld(string parm) //{ // AddUserGroupList(); // return "123--->456"; //} //private static string AddUserGroupList() //{ // return ""; //} //[System.Web.Services.WebMethod] //public static string GetDataTable() //{ // return DataTable2Json(CreateDataTable()); //} //public static System.Data.DataTable CreateDataTable() //{ // System.Data.DataTable dataTable1 = new System.Data.DataTable("BlogUser"); // System.Data.DataRow dr; // dataTable1.Columns.Add(new System.Data.DataColumn("UserId", typeof(System.Int32))); // dataTable1.Columns.Add(new System.Data.DataColumn("UserName", typeof(System.String))); // dataTable1.PrimaryKey = new System.Data.DataColumn[] { dataTable1.Columns["UserId"] }; // for (int i = 0; i < 8; i++) // { // dr = dataTable1.NewRow(); // dr[0] = i; // dr[1] = "【孟子E章】" + i.ToString() + " 前端传递的参数的值分别是:"; // dataTable1.Rows.Add(dr); // } // return dataTable1; //} //public static string DataTable2Json(System.Data.DataTable dt) //{ // StringBuilder jsonBuilder = new StringBuilder(); // jsonBuilder.Append("{\""); // jsonBuilder.Append(dt.TableName.ToString()); // jsonBuilder.Append("\":["); // for (int i = 0; i < dt.Rows.Count; i++) // { // jsonBuilder.Append("{"); // for (int j = 0; j < dt.Columns.Count; j++) // { // jsonBuilder.Append("\""); // jsonBuilder.Append(dt.Columns[j].ColumnName); // jsonBuilder.Append("\":\""); // jsonBuilder.Append(dt.Rows[i][j].ToString()); // jsonBuilder.Append("\","); // } // jsonBuilder.Remove(jsonBuilder.Length - 1, 1); // jsonBuilder.Append("},"); // } // jsonBuilder.Remove(jsonBuilder.Length - 1, 1); // jsonBuilder.Append("]"); // jsonBuilder.Append("}"); // return jsonBuilder.ToString(); //} //[WebMethod] //public static void dddddddaaaaaa() //{ // string RergChannleList = ""; //} //protected void btnAddRegChannel_Click(object sender, EventArgs e) //{ //LinkButton lkbtn = new LinkButton(); //lkbtn.Text = ddpRegChannelList.SelectedItem.ToString(); //lkbtn.ID = "lkbtn_" + ddpRegChannelList.SelectedValue.ToString(); //lkbtn.Click //dvRegChannelList.Controls.Remove(); //dvRegChannelList.Controls.Add(lkbtn); //btnAddChannel(); //BindChanelListGrid(); //} ////清除控件中的数据 //private void clearValue() //{ //} private void BindUserGroupMainListDetail() { _userGroupEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _userGroupEntity.LogMessages.Userid = UserSession.Current.UserAccount; _userGroupEntity.LogMessages.Username = UserSession.Current.UserDspName; _userGroupEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _userGroupEntity.UserGroupDBEntity = new List<UserGroupDBEntity>(); UserGroupDBEntity userGroupDBEntity = new UserGroupDBEntity(); userGroupDBEntity.UserGroupID = hidUserGroupID.Value; _userGroupEntity.UserGroupDBEntity.Add(userGroupDBEntity); DataSet dsMainResult = UserGroupBP.UserMainListSelect(_userGroupEntity).QueryResult; if (dsMainResult.Tables.Count == 0 || dsMainResult.Tables[0].Rows.Count == 0) { detailMessageContent.InnerHtml = GetLocalResourceObject("WarningMessage").ToString(); return; } lbUserGroupNM.Text = dsMainResult.Tables[0].Rows[0]["USERGROUPNAME"].ToString(); lbRegChannelList.Text = dsMainResult.Tables[0].Rows[0]["REGCHANELNM"].ToString(); lbPlatformList.Text = dsMainResult.Tables[0].Rows[0]["PLATFORMNM"].ToString(); lbRegistDTime.Text = dsMainResult.Tables[0].Rows[0]["REGISTTIME"].ToString(); lbLoginDTime.Text = dsMainResult.Tables[0].Rows[0]["LOGINTIME"].ToString(); lbSubmitOrder.Text = dsMainResult.Tables[0].Rows[0]["SUBMITORDER"].ToString(); lbCompleteOrder.Text = dsMainResult.Tables[0].Rows[0]["COMPLETEORDER"].ToString(); lbLastOrder.Text = dsMainResult.Tables[0].Rows[0]["LASTORDER"].ToString(); lbManualCount.Text = dsMainResult.Tables[0].Rows[0]["MANUALCOUNT"].ToString(); txtManualAdd.Text = dsMainResult.Tables[0].Rows[0]["MANUALADD"].ToString(); lbUserCount.Text = dsMainResult.Tables[0].Rows[0]["AUTOCOUNT"].ToString(); }
private int CountLmSystemLog() { _userGroupEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _userGroupEntity.LogMessages.Userid = UserSession.Current.UserAccount; _userGroupEntity.LogMessages.Username = UserSession.Current.UserDspName; _userGroupEntity.LogMessages.IpAddress = UserSession.Current.UserIP; _userGroupEntity.UserGroupDBEntity = new List<UserGroupDBEntity>(); UserGroupDBEntity userGroupDBEntity = new UserGroupDBEntity(); userGroupDBEntity.UserGroupID = hidUserGroupID.Value; _userGroupEntity.PageCurrent = AspNetPager1.CurrentPageIndex; _userGroupEntity.PageSize = gridViewCSUserGroupListDetail.PageSize; _userGroupEntity.UserGroupDBEntity.Add(userGroupDBEntity); DataSet dsResult = UserGroupBP.UserDetailListCount(_userGroupEntity).QueryResult; if (dsResult.Tables.Count > 0 && dsResult.Tables[0].Rows.Count > 0 && !String.IsNullOrEmpty(dsResult.Tables[0].Rows[0][0].ToString())) { return int.Parse(dsResult.Tables[0].Rows[0][0].ToString()); } return 0; }