public void Process(string xfileSavingPath, string condition, bool excelOnly) { inputgPath = xfileSavingPath.Replace(".xlsx", $"_{condition}Input1st.xlsx"); outputPath = xfileSavingPath.Replace(".xlsx", $"_{condition}ResultFinal.xlsx"); Joint_Coordinates(); Joint_Restraint_Assignments(); Connectivity_FrameAND_Frame_Output_Station_Assigns(); Connectivity_Link_And_Link_Property_Assignments(); Link_Props_01_General(); Link_Props_05_Gap(); //Frame_Props_01_Generall_AND_Frame_Props_02_Concrete_Col(); SetFrameMaterial(); // Frame_Section_Assignments(); //Frame_Section_Assignments //MatProp_01_General_AND_MatProp_02_BasicAnd_Mech_Props_AND_MatProp_03b_Concrete_Data(); Frame_Loads_Distributed_AND_Frame_Section_Assignments(); input.FileSaving(inputgPath); // all worksheet List <string> names = new List <string>(); names.Add("Joint Coordinates"); names.Add("Joint Restraint Assignments"); names.Add("Connectivity - Frame"); names.Add("Connectivity - Link"); names.Add("Link Property Assignments"); names.Add("Link Props 05 - Gap"); names.Add("Frame Props 01 - General"); names.Add("Frame Section Assignments"); names.Add("Frame Loads - Distributed"); names.Add("Jt Spring Assigns 1 - Uncoupled"); names.Add("MatProp 01 - General"); names.Add("MatProp 02 - Basic Mech Props"); names.Add("MatProp 03b - Concrete Data"); names.Add("Load Case Definitions"); names.Add("Load Pattern Definitions"); names.Add("Case - Static 1 - Load Assigns"); names.Add("Case - Static 2 - NL Load App"); names.Add("Combination Definitions"); names.Add("Program Control"); string[] wordtemp = xfileSavingPath.Split('\\'); string wordpath = ""; for (int i = 0; i < wordtemp.Length - 1; i++) { wordpath += wordtemp[i]; wordpath += "\\"; } wordpath += "ConnectTunnel.docx"; //string wordpath = xfileSavingPath.Replace(".xlsx", $".docx"); word.Add(inputgPath, names, false, false); if (excelOnly) { return; } SAPCalculation(inputgPath, "DL+SOIL (NL)", outputPath, frameName, out bool getResult, "Connector", 1); word.Add(outputPath, names, true, false); word.FileSaving(wordpath); oUploadFile.UploadToServer(sectionUID, wordpath); string TR = "TR"; List <Tuple <string, double, double, double> > outData = new List <Tuple <string, double, double, double> >(); List <string> rc = new List <string>(); outData = SAPChosenData("", frameName, BHFrame, "Main"); rc.Add(outData[0].Item1); outData = SAPChosenData("", frameName, BHFrame, "Shear"); rc.Add(outData[0].Item1); outData = SAPChosenData(TR, frameName, TRFrame, "Main"); rc.Add(outData[0].Item1); outData = SAPChosenData(TR, frameName, TRFrame, "Shear"); rc.Add(outData[0].Item1); try { oExcuteSQL.DeleteDataBySectionUID("STN_ConnectorResult", sectionUID); } catch { } oExcuteSQL.InsertData("STN_ConnectorResult", "Section", sectionUID); oExcuteSQL.UpdateData("STN_ConnectorResult", "Section", sectionUID, "BHRC", rc[0]); oExcuteSQL.UpdateData("STN_ConnectorResult", "Section", sectionUID, "BHStirrup", rc[1]); oExcuteSQL.UpdateData("STN_ConnectorResult", "Section", sectionUID, "TRRC", rc[2]); oExcuteSQL.UpdateData("STN_ConnectorResult", "Section", sectionUID, "TRStirrup", rc[3]); oExcuteSQL.UpdateData("STN_ConnectorResult", "Section", sectionUID, "BHStartMember", (BHStart + 1).ToString()); oExcuteSQL.UpdateData("STN_ConnectorResult", "Section", sectionUID, "BHEndMember", (BHEnd - 1).ToString()); }
public void Process(string xfileSavingPath, string condition, bool excelOnly) { inputgPath = xfileSavingPath.Replace(".xlsx", $"_{condition}Input1st.xlsx"); outputPath = xfileSavingPath.Replace(".xlsx", $"_{condition}ResultFinal.xlsx"); Radius = float.Parse(p.segmentRadiusIn.ToString()); Thick = float.Parse(p.segmentThickness.ToString()); UseRadius = Radius + Thick / 2; //Aangle = float.Parse(p.segmentAAngle.ToString()); //Bangle = float.Parse(p.segmentBAngle.ToString()); Kangle = float.Parse(p.segmentKAngle.ToString()); ADangle = float.Parse(p.segmentAdjacentPoreAngle.ToString()); Joint_Coordinates(); Joint_Restraint_Assignments(); Connectivity_Frame_AND_Frame_Output_Station_Assigns(); Link_Props_01_General_AND_Link_Props_05_Gap(); Connectivity_Link_And_Link_Property_Assignments(); //Frame_Props_01_Generall_AND_Frame_Props_02_Concrete_Col(); SetFrameMaterial(); Frame_Section_Assignments(); // Frame_Releases1_General(); //MatProp_01_General_AND_MatProp_02_BasicAnd_Mech_Props_AND_MatProp_03b_Concrete_Data(); Frame_Loads_Distributed(); input.FileSaving(inputgPath); // all worksheet List <string> names = new List <string>(); names.Add("Joint Coordinates"); names.Add("Joint Restraint Assignments"); names.Add("Connectivity - Frame"); names.Add("Connectivity - Link"); names.Add("Link Property Assignments"); names.Add("Link Props 05 - Gap"); names.Add("Frame Props 01 - General"); names.Add("Frame Section Assignments"); names.Add("Frame Loads - Distributed"); names.Add("Jt Spring Assigns 1 - Uncoupled"); names.Add("MatProp 01 - General"); names.Add("MatProp 02 - Basic Mech Props"); names.Add("MatProp 03b - Concrete Data"); names.Add("Load Case Definitions"); names.Add("Load Pattern Definitions"); names.Add("Case - Static 1 - Load Assigns"); names.Add("Case - Static 2 - NL Load App"); names.Add("Combination Definitions"); names.Add("Program Control"); string[] wordtemp = xfileSavingPath.Split('\\'); string wordpath = ""; for (int i = 0; i < wordtemp.Length - 1; i++) { wordpath += wordtemp[i]; wordpath += "\\"; } wordpath += "SiteTunnel.docx"; //string wordpath = xfileSavingPath.Replace(".xlsx", $".docx"); word.Add(inputgPath, names, false, false); if (excelOnly) { return; } SAPCalculation(inputgPath, "DL+SOIL (NL)", outputPath, frameName); word.Add(outputPath, names, true, false); word.FileSaving(wordpath); oUploadFile.UploadToServer(sectionUID, wordpath); try { oExcuteSQL.DeleteDataBySectionUID("STN_SiteResult", sectionUID); } catch { } oExcuteSQL.InsertData("STN_SiteResult", "Section", sectionUID); oExcuteSQL.UpdateData("STN_SiteResult", "Section", sectionUID, "RC", RCUID); oExcuteSQL.UpdateData("STN_SiteResult", "Section", sectionUID, "Stirrup", stirrupUID); }