예제 #1
0
파일: globals.cs 프로젝트: jpheary/Argix10
 public static void Trace(string message, LogLevel level)
 {
     //Trace
     if (level >= _Config.TraceLevel)
     {
         TraceMessage m = new TraceMessage();
         m.Name     = "Argix10";
         m.Source   = App.Product;
         m.User     = Environment.UserName;
         m.Computer = Environment.MachineName;
         m.LogLevel = level;
         m.Message  = message;
         TsortGateway.WriteLogEntry(m);
     }
 }
예제 #2
0
    protected void OnCommand(object sender, CommandEventArgs e)
    {
        //Event handler for toolbar button clicked
        try {
            switch (e.CommandName)
            {
            case "Refresh":
                OnClientChanged(this.cboClient, EventArgs.Empty);
                break;

            case "Submit":
                Session["LoadTenders"] = null;
                if (this.grdTenders.DataKeys.Count > 0)
                {
                    //Get parameters for the query
                    string            client = this.cboClient.SelectedValue;
                    DateTime          start  = DateTime.Parse(this.txtFromDate.Text);
                    DateTime          end    = DateTime.Parse(this.txtToDate.Text);
                    LoadTenderDataset ds     = new LoadTenderDataset();
                    LoadTenderDataset _ds    = new Argix.TsortGateway().GetLoadTenders(client, start, end);
                    foreach (GridViewRow row in SelectedRows)
                    {
                        DataKey dataKey = (DataKey)this.grdTenders.DataKeys[row.RowIndex];
                        string  load    = dataKey["Load"].ToString();
                        ds.Merge(_ds.LoadTenderTable.Select("Load='" + load + "'"));

                        LoadTenderDetailDataset detail = new Argix.TsortGateway().GetLoadTenderDetails(load);
                        if (detail.LoadTenderDetailTable.Rows.Count > 0)
                        {
                            ds.Merge(detail);
                        }
                    }
                    Session["LoadTenders"] = ds;
                    Response.Redirect("LoadTender.aspx", false);
                }
                break;
            }
        }
        catch (Exception ex) { Master.ReportError(ex, 4); }
    }
예제 #3
0
파일: globals.cs 프로젝트: jpheary/Argix10
 public LoadTenderConfiguration()
 {
     //Constructor
     this.mConfig = TsortGateway.GetUserConfiguration(App.Product, new string[] { Environment.UserName, Environment.MachineName });
 }