コード例 #1
0
ファイル: OrderMakerForm.cs プロジェクト: beirbear/PrivateDCP
        private void เราToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PasswordForm passForm = new PasswordForm("(หมายเหตุ!!! สินค้าที่ถูกเพิ่มชั่วคราวจะหายไป)");
            if (passForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ProductEditorForm pdeForm = new ProductEditorForm(Space.InfoType.DCP);
                if (pdeForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    // RELOAD PRODUCT DATA
                    List<Product> newProdList = Space.GetProductList();
                    for (int i = 0; i < productsList.Count; i++)
                    {
                        var res = newProdList.Where(ex =>  ex.Name == productsList[i].Name &&
                                                    ex.Unit == productsList[i].Unit).SingleOrDefault();

                        if (res == null)
                            newProdList.Add(productsList[i]);
                    }
                    this.productsList = newProdList;
                }
                pdeForm.Dispose();
            }
            passForm.Dispose();
        }
コード例 #2
0
ファイル: OrderMakerForm.cs プロジェクト: beirbear/PrivateDCP
        private void แกไขขอมลลกคาToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ///// MOVE TO OUTSIDE
            PasswordForm passForm = new PasswordForm("(หมายเหตุ!!! กรุณาแก้ไขด้วยความระมัดระวัง)");
            if (passForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                CustomerEditorForm custEditerForm = new CustomerEditorForm(route);
                if (custEditerForm.ShowDialog() == DialogResult.OK)
                {
                    // Update customer list
                    InitializeCustomerList();
                    UpdateCustomerState();
                    UpdateCustomerStateAmr();
                    UpdateEveryCustomerIcon();
                    DisplayCustomerInfo();

                    if (lvInhibit)
                        lvInhibit = false;
                    else
                        lvInhibit = true;
                }
                custEditerForm.Close();
            }
            passForm.Close();
        }
コード例 #3
0
ファイル: OrderMakerForm.cs プロジェクト: beirbear/PrivateDCP
 private void อามาToolStripMenuItem_Click(object sender, EventArgs e)
 {
     PasswordForm passForm = new PasswordForm("(หมายเหตุ!!! สินค้าที่ถูกเพิ่มชั่วคราวจะหายไป)");
     if (passForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         ProductEditorForm pdeForm = new ProductEditorForm(Space.InfoType.AMR);
         if (pdeForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             // RELOAD PRODUCT DATA
             this.productsListAmr = Space.GetProductListAmr();
         }
         pdeForm.Dispose();
     }
     passForm.Dispose();
 }