Beispiel #1
0
        private DataRow UsbToRow(OltcUpandata oltc)
        {
            System.Data.DataRow row = WorkingSets.local.TestResults.NewRow();

            try { row["testname"] = jobInfo.Information.testingName; } catch { }
            try { row["testid"] = jobInfo.Information.GetHashCode(); } catch { }
            try { row["transformerid"] = jobInfo.Transformer.ID; } catch { }
            try { row["mj_id"] = jobInfo.id; } catch { }

            try { row["function"] = GetIniFileData.GetOltcNum(oltc).Function; } catch { }
            try { row["windingtype"] = GetIniFileData.GetOltcNum(oltc).windingtype; } catch { }
            try { row["windingconfig"] = GetIniFileData.GetOltcNum(oltc).windingconfig; } catch { }
            try { row["failed"] = 0; } catch { }
            try { row["completed"] = 1; } catch { }
            try { row["recordtime"] = oltc.Data; } catch { }
            string waves = oltc.Awaveform + oltc.Bwaveform + oltc.Cwaveform + oltc.Dwaveform;

            byte[] byteArray = Encoding.Default.GetBytes(waves);
            try { row["waves"] = Convert.ToBase64String(byteArray); } catch { }
            return(row);
        }
Beispiel #2
0
 private DataRow UsbToRow(CaptanceUpandata cap)
 {
     System.Data.DataRow row = WorkingSets.local.TestResults.NewRow();
     try { row["testname"] = jobInfo.Information.testingName; } catch { }
     try { row["testid"] = jobInfo.Information.GetHashCode(); } catch { }
     try { row["transformerid"] = jobInfo.Transformer.ID; } catch { }
     try { row["mj_id"] = jobInfo.id; } catch { }
     //row["testname"] =
     try { row["function"] = GetIniFileData.GetCapNum(cap).Function; } catch { }
     try { row["windingtype"] = GetIniFileData.GetCapNum(cap).windingtype; } catch { }
     try { row["terimal"] = GetIniFileData.GetCapNum(cap).Termal; } catch { }
     try { row["windingconfig"] = GetIniFileData.GetCapNum(cap).windingconfig; } catch { }
     try { row["failed"] = 0; } catch { }
     try { row["completed"] = 1; } catch { }
     try { row["result_pv1"] = cap.Fre; } catch { }
     try { row["result_pv2"] = cap.Volate; } catch { }
     try { row["result_pv3"] = cap.Cx; } catch { }
     try { row["result_pv4"] = cap.Tan; } catch { }
     try { row["recordtime"] = cap.Time; } catch { }
     return(row);
 }
 private DataRow UsbToRow(DcresistaceUpandata res)
 {
     System.Data.DataRow row = WorkingSets.local.TestResults.NewRow();
     try { row["testname"] = jobInfo.Information.testingName; } catch { }
     try { row["testid"] = jobInfo.Information.GetHashCode(); } catch { }
     try { row["transformerid"] = jobInfo.Transformer.ID; } catch { }
     try { row["mj_id"] = jobInfo.id; } catch { }
     try { row["mj_id"] = 1; } catch { }
     //row["testname"] =
     try { row["function"] = 3; } catch { }
     try { row["windingtype"] = GetIniFileData.GetResPositionTerimal(res).windingtype; } catch { }
     if (GetIniFileData.GetResPositionTerimal(res).Termal != null)
     {
         try { row["terimal"] = GetIniFileData.GetResPositionTerimal(res).Termal; } catch { }
     }
     try { row["windingconfig"] = GetIniFileData.GetResPositionTerimal(res).windingconfig; } catch { }
     //if (TapLabel != null)
     //{
     //    if (TapLabel.Length == 2)
     //        try { row["taplabel"] = TapLabel[0] + ";" + TapLabel[1]; } catch { }
     //    else if (Terimal.Length == 1)
     //        try { row["taplabel"] = TapLabel[0]; } catch { }
     //    else
     //        try { row["taplabel"] = string.Empty; } catch { }
     //}
     try { row["failed"] = 0; } catch { }
     try { row["completed"] = 1; } catch { }
     try { row["result_pv1"] = res.Av; } catch { }
     try { row["result_pv2"] = res.Ai; } catch { }
     try { row["result_pv3"] = res.Ar; } catch { }
     try { row["result_pv4"] = res.Bv; } catch { }
     try { row["result_pv5"] = res.Bi; } catch { }
     try { row["result_pv6"] = res.Br; } catch { }
     try { row["result_pv7"] = res.Cv; } catch { }
     try { row["result_pv8"] = res.Ci; } catch { }
     try { row["result_pv9"] = res.Cr; } catch { }
     try { row["recordtime"] = res.Time; } catch { }
     return(row);
 }
Beispiel #4
0
        private DataRow UsbToRow(DcInlutionUpandata dci)
        {
            System.Data.DataRow row = WorkingSets.local.TestResults.NewRow();
            try { row["testname"] = jobInfo.Information.testingName; } catch { }
            try { row["testid"] = jobInfo.Information.GetHashCode(); } catch { }
            try { row["transformerid"] = jobInfo.Transformer.ID; } catch { }
            try { row["mj_id"] = jobInfo.id; } catch { }

            //row["testname"] =
            try { row["function"] = GetIniFileData.GetDciNum(dci).Function; } catch { }
            try { row["windingtype"] = GetIniFileData.GetDciNum(dci).windingtype; } catch { }
            try { row["terimal"] = GetIniFileData.GetDciNum(dci).Termal; } catch { }
            try { row["windingconfig"] = GetIniFileData.GetDciNum(dci).windingconfig; } catch { }
            try { row["failed"] = 0; } catch { }
            try { row["completed"] = 1; } catch { }
            try { row["recordtime"] = dci.Data; } catch { }

            try { row["result_pv1"] = dci.Volate; } catch { }
            try { row["result_pv2"] = dci.Resistance; } catch { }
            try { row["result_pv3"] = dci.Abs; } catch { }
            try { row["result_pv4"] = dci.Jhzs; } catch { }
            return(row);
        }