예제 #1
0
 private void button53_Click(object sender, EventArgs e)
 {
     getGui.DeleteInvoiceItemized(StaticClass.storeId, this.invoiceNum);
     if (myCash1.listInvoiceItem.Rows.Count == 0)
     {
         myCash1.invoiceTotal.Rows[0][15] = "V";
         getGui.CloseTable(StaticClass.storeId, invoiceNum);
     }
     else
     {
         foreach (DataRow c in myCash1.listInvoiceItem.Rows)
         {
             getGui.UpdateInvoiceItemized(StaticClass.storeId, invoiceNum, c[2].ToString(), c[3].ToString(), c[12].ToString(), c[1].ToString(), c[6].ToString(), c[7].ToString(), c[8].ToString());
         }
     }
     UpdateInvoiceTotals();
     this.Dispose();
     formLayout.FrmLayout_Load(null, null);
     //formLogin.FrmLogin_Load(null, null);
 }
예제 #2
0
 private void but_Done_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < sections.Count; i++)
     {
         var tmp = (panel)listPanel[sections[i]];
         if (tmp.isNew == false)
         {
             if (tmp.isDelete == false)
             {
                 getGui.UpdateSection(tmp.txtSection.Text, tmp.colorBar1.color_prop.ToArgb().ToString(), tmp.colorBar2.color_prop.ToArgb().ToString(), "1001", tmp.Text);
                 foreach (MyButton o in tmp.mangMyButton)
                 {
                     string style;
                     if (o.ButtonStyle == MyButton.ButtonStyles.Ellipse)
                     {
                         style = "2";
                     }
                     else
                     {
                         style = "0";
                     }
                     if (o.isNew == false)
                     {
                         if (o.isDelete == false)
                         {
                             getGui.UpdateTable("1001", tmp.txtSection.Text, o.Text_pro, style, o.Left.ToString(), o.Top.ToString(), o.Height.ToString(), o.Width.ToString(), "0", "0", "false", "", tmp.colorBar3.color_prop.ToArgb().ToString(), "-16777216");
                         }
                         else
                         {
                             getGui.DeleteTableDiagram("1001", tmp.txtSection.Text, o.Text_pro);
                         }
                     }
                     else
                     {
                         if (o.isDelete == false)
                         {
                             getGui.InsertTableDiagram("1001", tmp.txtSection.Text, o.Text_pro, style, o.Left.ToString(), o.Top.ToString(), o.Height.ToString(), o.Width.ToString(), "0", "0", "0", "false", "", tmp.colorBar3.color_prop.ToArgb().ToString(), "-16777216");
                         }
                     }
                 }
             }
             else
             {
                 getGui.DeleteSection("1001", tmp.Text);
             }
         }
         else
         {
             if (tmp.isDelete == false)
             {
                 getGui.InsertSection("1001", tmp.txtSection.Text, tmp.colorBar1.color_prop.ToArgb().ToString(), tmp.colorBar2.color_prop.ToArgb().ToString());
                 foreach (MyButton o in tmp.mangMyButton)
                 {
                     string style;
                     if (o.ButtonStyle == MyButton.ButtonStyles.Ellipse)
                     {
                         style = "2";
                     }
                     else
                     {
                         style = "0";
                     }
                     getGui.InsertTableDiagram("1001", tmp.txtSection.Text, o.Text_pro, style, o.Left.ToString(), o.Top.ToString(), o.Height.ToString(), o.Width.ToString(), "0", "0", "0", "false", "", tmp.colorBar3.color_prop.ToArgb().ToString(), "-16777216");
                 }
             }
         }
     }
     for (int i = 0; i < formLayout.sections.Count; i++)
     {
         var tmp = (PanelLayout)formLayout.listPanel[formLayout.sections[i].ToString()];
         tmp.Dispose();
     }
     formLayout.FrmLayout_Load(null, null);
     this.Dispose();
 }