示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            GINGridViewer1.DataBind();
            var gridCommands = from command in GINGridViewer1.Driver.Columns
                               where command.IsCommand
                               select command.AttachedRenderer;

            foreach (LinkGINColumnRenderer linkCommand in gridCommands)
            {
                linkCommand.Command += new CommandEventHandler(linkCommand_Command);
            }
            if (!IsPostBack)
            {
                GINDataEditor1.DataSource = ginProcess.GINProcessInformation;
                GINDataEditor1.DataBind();
            }
        }
示例#2
0
 void GINDataEditor2_Ok(object sender, EventArgs e)
 {
     if (GINDataEditor2.IsNew)
     {
         ginProcess.AddTruck((GINTruckInfo)GINDataEditor2.DataSource);
         GINGridViewer1.DataBind();
     }
     else
     {
         var editedTruck = from truck in ginProcess.GINProcessInformation.Trucks
                           where truck.TruckId == ((GINTruckInfo)GINDataEditor2.DataSource).TruckId
                           select truck;
         if (editedTruck.Count() > 0)
         {
             editedTruck.ElementAt(0).Copy((GINTruckInfo)GINDataEditor2.DataSource);
             GINGridViewer1.DataBind();
         }
     }
     SaveTruckInfo();
 }