Ejemplo n.º 1
0
    protected void UpdateButton_Click(object sender, ImageClickEventArgs e)
    {
        //
        DataSet dsGER        = new DataSet();
        string  SqlStatement = "UPDATE GERProcess ";

        SqlStatement += " SET GERProcess.ProcessRecInd = '1' ";
        SqlStatement += " FROM GERProcess,  ";
        SqlStatement += "   (SELECT * ";
        SqlStatement += " 	FROM GERDetail ";
        SqlStatement += "   WHERE (BOLNo = '" + BOLNumberBox.Text + "')) GERDtl";
        SqlStatement += " WHERE GERDtl.pGERDtlID = GERProcess.GERDetailID  ";
        SqlStatement += " and GERProcess.ProcessDt IS NULL ";
        int iRslt = SqlHelper.ExecuteNonQuery(connectionString, CommandType.Text, SqlStatement);

        lblSuccessMessage.Text = "Number of BOL Lines Updated : " + iRslt.ToString();
        SqlStatement           = " select BOLNo, ProcessRecInd from (  ";
        SqlStatement          += " Select BOLNo, case GERProcess.ProcessRecInd when 1 then 'Now' else 'Nightly' end as ProcessRecInd  ";
        SqlStatement          += " FROM GERProcess,  ";
        SqlStatement          += "   (SELECT * ";
        SqlStatement          += " 	FROM GERDetail ";
        SqlStatement          += "   WHERE (BOLNo = '" + BOLNumberBox.Text + "')) GERDtl";
        SqlStatement          += " WHERE GERDtl.pGERDtlID = GERProcess.GERDetailID  ";
        SqlStatement          += " and GERProcess.ProcessDt IS NULL) GetMstr ";
        SqlStatement          += " group by BOLNo, ProcessRecInd";
        dsGER     = SqlHelper.ExecuteDataset(connectionString, CommandType.Text, SqlStatement);
        dtBOLData = dsGER.Tables[0];
        ResultsGridView.DataSource = dtBOLData;
        ResultsGridView.DataBind();
        ResultsGridView.Visible = true;
        UpdateButton.Visible    = false;
        BOLNumberBox.Focus();
    }
        public void LoadRaceTime()
        {
            var controller = new RacingController();
            var raceID     = ScheduleGridView.SelectedValue;
            var results    = controller.Results_List(Convert.ToInt32(raceID));

            var penalties = controller.Penalties_List();

            UpdateResults.Visible = true;


            ResultsGridView.DataSource = results;
            ResultsGridView.DataBind();
            foreach (GridViewRow row in ResultsGridView.Rows)
            {
                DropDownList penaltiesDropDown = (DropDownList)row.FindControl("PenaltyDropDownList");
                HiddenField  penaltyID         = (HiddenField)row.FindControl("PenaltyID");
                Label        placeLabel        = (Label)row.FindControl("PlaceLabel");

                if (placeLabel.Text != "")
                {
                    string newLabel = ConvertIntsToStrings(int.Parse(placeLabel.Text));
                    placeLabel.Text = newLabel;
                }

                penaltiesDropDown.DataSource = penalties;

                if (penaltyID.Value != "")
                {
                    penaltiesDropDown.SelectedValue = penaltyID.Value;
                }
                penaltiesDropDown.DataBind();
            }
        }
Ejemplo n.º 3
0
        protected void SearchButton_Click(object sender, EventArgs e)
        {
            //TODO: split search field on spaces, add symptom searching, add boolean searching, may need to use different search method (not parameters)

            ResultsDataSource.SelectParameters.Clear();
            ResultsDataSource.SelectParameters.Add(new Parameter("DiseaseName", System.Data.DbType.String, NameSearchTextBox.Text));
            ResultsDataSource.Select(DataSourceSelectArguments.Empty);
            ResultsDataSource.DataBind();
            ResultsGridView.DataBind();
        }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         //TODO: get data from text field in site.master, update search parameters
         ResultsDataSource.SelectParameters.Clear();
         ResultsDataSource.SelectParameters.Add(new Parameter("DiseaseName", System.Data.DbType.String, "Test"));
         ResultsDataSource.Select(DataSourceSelectArguments.Empty);
         ResultsDataSource.DataBind();
         ResultsGridView.DataBind();
     }
 }
        protected void RunReportClick(object sender, EventArgs e)
        {
            string v = VisitList.SelectedValue;
            int    timelineid;

            if (!string.IsNullOrEmpty(v) && int.TryParse(v, out timelineid))
            {
                string[] surveyTypes = GetSelectedSurveyTypes();
                //string[] surveyTypes = GetSelectedItems(SurveyTypeList);
                DataTable results = ProtocolMgmtDa.GetSurveyItemsByTimelineId(timelineid, surveyTypes);
                ResultsGridView.DataSource = results;
                ResultsGridView.DataBind();


                if (results.Rows.Count > 0)
                {
                    ShowSearchExport(true, true);
                    ResultsGridView.Visible = true;
                }
            }
        }
Ejemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        DateTime localTime = DateTime.Now.ToUniversalTime().AddHours(1);

        TimeLabel.Text = localTime.Hour.ToString() + ":" + localTime.Minute.ToString() + ":" + localTime.Second.ToString();
        LotusDataContext db = new LotusDataContext(Data.ConnectionManager());
        var source          = (from b in db.bookings
                               join p in db.pages on b.page_id equals p.page_id
                               where (b.status == "NEW")
                               orderby b.id descending
                               select new
        {
            ID = b.id,
            User = b.user_name,
            Service = p.title,
            Date = b.submited_date.ToString(),
            Status = b.status
        }).Distinct();

        ResultsGridView.DataSource = source;
        ResultsGridView.DataBind();
    }
 public void Close_Results()
 {
     UpdateResults.Visible      = false;
     ResultsGridView.DataSource = null;
     ResultsGridView.DataBind();
 }