private void InitGrids() { gridPool = new UIUtils.SimplePool(lineModel, lineRoot); UIUtils.SetActive(lineModel, false); gridUtil = new GridCommon(); gridUtil.SetAction(UpdateGridCallBack); thousand = gridUtil.gridThousandInterval; hundred = gridUtil.gridHunderdInterval; }
public SimpleTask(UserTask task) { this.taskID = task.TaskID; this.taskTitle = HttpUtility.HtmlEncode(task.TaskTitle); this.deliverTime = task.DeliverTime; this.applicationName = task.ApplicationName; this.url = task.Url; this.feature = GridCommon.GetFeature(task); this.status = task.Status; }
protected void GridViewTask_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { //GridCommon.SetRowStyleWhenMouseOver(e.Row); GridCommon.SetRowStyleWhenMouseOver(e.Row, "selecteditem", "taitem", "titem"); UserTask task = (UserTask)e.Row.DataItem; e.Row.Cells[2].Text = GridCommon.GetTaskURL(task); // e.Row.Cells[5].Text = GridCommon.TimeDisplayFormat(task.CompletedTime); } }
protected void GridViewTask_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { GridCommon.SetRowStyleWhenMouseOver(e.Row); GridCommon.HighlightTopItem(e.Row); GridCommon.SetUnreadItemBold(e.Row); UserTask task = (UserTask)e.Row.DataItem; if (this.GridViewTask.ExportingDeluxeGrid) { e.Row.Cells[2].Text = Server.HtmlEncode(task.TaskTitle).ToString().Replace(" ", " "); } else { e.Row.Cells[3].Text = GridCommon.GetTaskURL(task); } } }
private void btnSelect_Click(object sender, EventArgs e) { try { DataRowView drv = lstPollutant.SelectedItem as DataRowView; if (drv == null) { return; } BenMAPPollutant pollutant = null; string type = string.Empty; if (lstSPollutant.Items.Count == 0) { lstSPollutant.Items.Add(lstPollutant.GetItemText(lstPollutant.SelectedItem)); pollutant = GridCommon.getPollutantFromID(int.Parse(drv["PollutantID"].ToString())); CommonClass.LstPollutant.Add(pollutant); } else if (lstSPollutant.Items.Count != 0) { if (!lstSPollutant.Items.Contains(lstPollutant.GetItemText(lstPollutant.SelectedItem))) { lstSPollutant.Items.Add(lstPollutant.GetItemText(lstPollutant.SelectedItem)); pollutant = GridCommon.getPollutantFromID(int.Parse(drv["PollutantID"].ToString())); CommonClass.LstPollutant.Add(pollutant); } else { MessageBox.Show(string.Format("{0} has already been selected.", lstPollutant.GetItemText(lstPollutant.SelectedItem))); } } } catch (Exception ex) { Logger.LogError(ex.Message); } }