コード例 #1
0
ファイル: TxtEditBox.cs プロジェクト: Yslelf/VexGuiEdit
 public void GuiCodeTxt_TextChanged(object sender, EventArgs e)
 {
     try
     {
         LineP.Invalidate();
         //比如 map_title    ok
         string currentTabName = Main.Mainfrm.tabControl1.TabPages[Main.Mainfrm.tabControl1.SelectedIndex].Text.Substring(Main.Mainfrm.tabControl1.TabPages[Main.Mainfrm.tabControl1.SelectedIndex].Text.IndexOf(":") + 1);  //map_title.yml [文档]
         string newName        = currentTabName.Substring(0, currentTabName.LastIndexOf("[") - 5);
         if (Main.Mainfrm.tabControl1.TabPages[Main.Mainfrm.tabControl1.SelectedIndex].Tag == "image")
         {
             Stream stream = File.Open(Main.ImagesPath + newName + ".xml", FileMode.Open, FileAccess.Write, FileShare.ReadWrite);
             stream.Seek(0, SeekOrigin.Begin);
             stream.SetLength(0);
             stream.Close();
             File.WriteAllText(Main.ImagesPath + newName + ".xml", Main.Mainfrm.tabControl1.TabPages[Main.Mainfrm.tabControl1.SelectedIndex].Controls[0].Controls[0].Text);
             XmlMethods.ReadIm(Main.ImagesPath + newName + ".xml");
             Main.Mainfrm.GuiPropertyGrid.SelectedObject = SGuiFrame.Im;
         }
         else if (Main.Mainfrm.tabControl1.TabPages[Main.Mainfrm.tabControl1.SelectedIndex].Tag == "button")
         {
             Stream stream = File.Open(Main.ButtonsPath + newName + ".xml", FileMode.Open, FileAccess.Write, FileShare.ReadWrite);
             stream.Seek(0, SeekOrigin.Begin);
             stream.SetLength(0);
             stream.Close();
             File.WriteAllText(Main.ButtonsPath + newName + ".xml", Main.Mainfrm.tabControl1.TabPages[Main.Mainfrm.tabControl1.SelectedIndex].Controls[0].Controls[0].Text);
             XmlMethods.ReadBt(Main.ButtonsPath + newName + ".xml");
             Main.Mainfrm.GuiPropertyGrid.SelectedObject = SGuiFrame.Bt;
         }
         else if (Main.Mainfrm.tabControl1.TabPages[Main.Mainfrm.tabControl1.SelectedIndex].Tag == "text")
         {
             Stream stream = File.Open(Main.TextsPath + newName + ".xml", FileMode.Open, FileAccess.Write, FileShare.ReadWrite);
             stream.Seek(0, SeekOrigin.Begin);
             stream.SetLength(0);
             stream.Close();
             File.WriteAllText(Main.TextsPath + newName + ".xml", Main.Mainfrm.tabControl1.TabPages[Main.Mainfrm.tabControl1.SelectedIndex].Controls[0].Controls[0].Text);
             XmlMethods.ReadTxt(Main.TextsPath + newName + ".xml");
             Main.Mainfrm.GuiPropertyGrid.SelectedObject = SGuiFrame.Txt;
         }
     }
     catch
     {
     }
 }
コード例 #2
0
 public OperationResult saveLineP(LineP lineP)
 {
     /*
      *  Author          Billy Arredondo
      *  Create date     02-feb-2017
      *  Modify date     02-feb-2017
      *  Function        Ingresar a la tabla TRAMA_IFS_P un sólo registro.
      *                  El registro está modelado por LineH
      */
     try
     {
         this.add_Trama_ifs_p("[ifsDocsMost].[add_Trama_ifs_p]", lineP);
         return(new OperationResult());
     }
     catch (Exception ex)
     {
         _iLogService.Error(ex.Message);
         return(null);
     }
 }
コード例 #3
0
 public IFSRegister MapLinePToIFSFile(LineP lineP)
 {
     try
     {
         return(new IFSRegister()
         {
             sorterA = int.Parse(lineP.origen),
             sorterB = lineP.invoice_no,
             columns = new string[] {
                 lineP.line_type,
                 lineP.invoice_no,
                 lineP.item_id,
                 lineP.row_id,
                 lineP.code_a,
                 lineP.code_b,
                 lineP.code_c,
                 lineP.code_d,
                 lineP.code_e,
                 lineP.code_f,
                 lineP.code_g,
                 lineP.code_h,
                 lineP.code_i,
                 lineP.code_j,
                 lineP.quantity,
                 String.Format("{0:0.00}", double.Parse(lineP.curr_amount)),
                 lineP.dom_amount,
                 lineP.auto_posting_proc_code,
                 lineP.optional_code,
                 lineP.text,
                 lineP.project_activity_id /*,
                                            * lineP.branch,
                                            * lineP.invoice_type,*/// ← Ocultado porque son parámetros de más
             }
         });
     }
     catch (Exception ex)
     {
         this._ILogService.Error(ex.Message);
     }
     return(null);
 }
コード例 #4
0
        private void add_Trama_ifs_p(string SPName, LineP lineP)
        {
            try
            {
                // Agregamos los parámetros
                this.addInParameter("@ORIGEN", lineP.origen);
                this.addInParameter("@LINE_TYPE", lineP.line_type);
                this.addInParameter("@INVOICE_NO", lineP.invoice_no);
                this.addInParameter("@ITEM_ID", lineP.item_id);
                this.addInParameter("@ROW_ID", lineP.row_id);
                this.addInParameter("@CODE_A", lineP.code_a);
                this.addInParameter("@AUTO_POSTING_PROC_CODE", lineP.auto_posting_proc_code);
                this.addInParameter("@OPTIONAL_CODE", lineP.optional_code);
                this.addInParameter("@TEXT", lineP.text);
                this.addInParameter("@PROJECT_ACTIVITY_ID", lineP.project_activity_id);
                this.addInParameter("@BRANCH", lineP.branch);
                this.addInParameter("@INVOICE_TYPE", lineP.invoice_type);
                this.addInParameter("@CODE_H", lineP.code_h);
                this.addInParameter("@CODE_I", lineP.code_i);
                this.addInParameter("@CODE_J", lineP.code_j);
                this.addInParameter("@QUANTITY", lineP.quantity);
                this.addInParameter("@CURR_AMOUNT", lineP.curr_amount);
                this.addInParameter("@DOM_AMOUNT", lineP.dom_amount);
                this.addInParameter("@CODE_B", lineP.code_b);
                this.addInParameter("@CODE_C", lineP.code_c);
                this.addInParameter("@CODE_D", lineP.code_d);
                this.addInParameter("@CODE_E", lineP.code_e);
                this.addInParameter("@CODE_F", lineP.code_f);
                this.addInParameter("@CODE_G", lineP.code_g);

                // Ejecutamos el método
                this.executeSPWithoutResults(SPName);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #5
0
ファイル: TxtEditBox.cs プロジェクト: Yslelf/VexGuiEdit
 public void GuiCodeTxt_VScroll(object sender, EventArgs e)
 {
     LineP.Invalidate();
 }