Пример #1
0
        private void ShowServerSwitchRecordOnRow(DataGridViewRow row, ServerSwitchRecord item)
        {
            row.Tag = item;
            ParkInfo park = ParkBuffer.Current.GetPark(item.ParkID);

            row.Cells["colPark"].Value           = park == null ? string.Empty : park.ParkName;
            row.Cells["colSwitchDateTime"].Value = item.SwitchDateTime.ToString("yyyy-MM-dd HH:mm:ss");
            row.Cells["colSwitchServerIP"].Value = item.SwitchServerIP;
            row.Cells["colSwitchStatus"].Value   = HostStandbyStatusDescription.GetDescription(item.SwitchStatus);
            row.Cells["colOperator"].Value       = item.Operator;
            row.Cells["colLastDateTime"].Value   = item.LastDateTime == null ? string.Empty : item.LastDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
            row.Cells["colLastIP"].Value         = item.LastIP;
            row.Cells["colLastStatus"].Value     = HostStandbyStatusDescription.GetDescription(item.LastStatus);
            row.Cells["colSMSStatus"].Value      = SMSSendStatusDescription.GetDescription(item.SMSStatus);
            row.Cells["colMemo"].Value           = item.Memo;
        }
Пример #2
0
 public CommandResult Insert(ServerSwitchRecord info)
 {
     return(provider.Insert(info));
 }