G
Guest
I am trying to develop a tape management application which tracks backup
tapes for 3 servers. I need to be able to add new tapes and retire old/bad
tapes. I also need to track the location of the tapes between three
locations, the 'In Service Date' of each tape, and number of times each tape
has been loaded into its server.
So far I have three tables, one for tape mgmt (serverID, TapeID and 'In
Service Date'), one for tape status (TapeID, Status, Date) and one for
retired tapes (TapeID, RetireCode, RetiredBy, Date). I have everything
working except for the capability of updating the status of the tapes (and
Retiring tapes, but if I can get this working then I can do it).
Right now I am using a datalist (so I can display two columns - 50+ tapes at
a time) to display the tapes for a server depending on which radiobutton
(autopostback) the user clicks. The datalist has one ItemTemplate.
<ItemTemplate>
< %# PadTapeID(DataBinder.Eval(Container.DataItem,"TapeID")) %>
<aspropDownList ID="ddlTapeStatus" runat="server">
<asp:ListItem Value="1">Safe</asp:ListItem>
<asp:ListItem Value="2">Library</asp:ListItem>
<asp:ListItem Value="3">Iron Mountain</asp:ListItem>
<asp:ListItem Value="0">Retire</asp:ListItem>
</aspropDownList>
<%# DateTime.Parse(DataBinder.Eval(Container.DataItem,"In Service
Date").ToString()).ToShortDateString() %>
<%# LibraryCount(DataBinder.Eval(Container.DataItem,"TapeID"))%>
</ItemTemplate>
I guess the first question is - am I doing this the best way. Second - if I
am, how do I access loop over each data row in order to pass the TapeID and
the dlTapeStatus.SelectedValue to a method which will insert the data into
the database?
tapes for 3 servers. I need to be able to add new tapes and retire old/bad
tapes. I also need to track the location of the tapes between three
locations, the 'In Service Date' of each tape, and number of times each tape
has been loaded into its server.
So far I have three tables, one for tape mgmt (serverID, TapeID and 'In
Service Date'), one for tape status (TapeID, Status, Date) and one for
retired tapes (TapeID, RetireCode, RetiredBy, Date). I have everything
working except for the capability of updating the status of the tapes (and
Retiring tapes, but if I can get this working then I can do it).
Right now I am using a datalist (so I can display two columns - 50+ tapes at
a time) to display the tapes for a server depending on which radiobutton
(autopostback) the user clicks. The datalist has one ItemTemplate.
<ItemTemplate>
< %# PadTapeID(DataBinder.Eval(Container.DataItem,"TapeID")) %>
<aspropDownList ID="ddlTapeStatus" runat="server">
<asp:ListItem Value="1">Safe</asp:ListItem>
<asp:ListItem Value="2">Library</asp:ListItem>
<asp:ListItem Value="3">Iron Mountain</asp:ListItem>
<asp:ListItem Value="0">Retire</asp:ListItem>
</aspropDownList>
<%# DateTime.Parse(DataBinder.Eval(Container.DataItem,"In Service
Date").ToString()).ToShortDateString() %>
<%# LibraryCount(DataBinder.Eval(Container.DataItem,"TapeID"))%>
</ItemTemplate>
I guess the first question is - am I doing this the best way. Second - if I
am, how do I access loop over each data row in order to pass the TapeID and
the dlTapeStatus.SelectedValue to a method which will insert the data into
the database?