Example #1
0
        void fillData()
        {
            int    j     = 0;
            double total = 0;
            int    sTop  = 0;

            for (int i = 0; i <= d1.Rows.Count - 1; i++)
            {
                frmItem f1 = new frmItem();
                pnllist.Controls.Add(f1);
                f1.Top = sTop;
                f1.Controls["txtnumber"].Text = (i + 1).ToString();
                f1.Controls["txtname"].Text   = d1.Rows[i]["sName"].ToString();
                f1.Controls["txtprice"].Text  = myLibrary.Number2Curreny(d1.Rows[i]["sPrice"].ToString());
                f1.Controls["txtcount"].Text  = d1.Rows[i]["sCount"].ToString();
                total += (Convert.ToDouble(d1.Rows[i]["sCount"]) * Convert.ToDouble(d1.Rows[i]["sPrice"]));
                f1.Tag = d1.Rows[i]["sID"].ToString();
                f1.Controls["imgdelete"].Visible = false;
                sTop          += 44;
                pnllist.Height = pnllist.Height + 44;
                j             = i;
                lbltotal.Text = myLibrary.Number2Curreny(total.ToString()) + " ريال";
                Application.DoEvents();
            }
        }
Example #2
0
        private void itemToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmItem item = new frmItem();

            item.MdiParent = this;
            item.Show();
        }
Example #3
0
        private void ShowEntryForm(FormState Mystate)
        {
            try
            {
                FormHelpers.CursorWait(true);
                var frm = new frmItem();
                switch (Mystate)
                {
                case FormState.Add:
                    break;

                case FormState.Edit:
                case FormState.View:
                    var itemno = mgridList.Rows[mgridList.SelectedCells[0].RowIndex].Cells["colItemNo"].Value.ToString();
                    frm.itemno = itemno;
                    break;
                }
                frm.MyState  = Mystate;
                frm.MyCaller = this;
                FormHelpers.ShowForm(frm, (MetroForm)this.MdiParent);
            }
            catch (Exception ex)
            {
                MessageHelpers.ShowError(ex.Message);
            }
            finally
            {
                FormHelpers.CursorWait(false);
            }
        }
        private void myIconButton5_Click(object sender, EventArgs e)
        {
            if (!MyLove.PermissionsBalidation(oper_type, "18"))
            {
                return;
            }
            frmItem frm = new frmItem(windowsList);

            windowsList.ShowForm(frm);
        }
Example #5
0
 private void btnEditItem_Click(object sender, EventArgs e)
 {
     if (itemID != 0)
     {
         frmItem form = new frmItem(itemID, this);
         form.Show();
     }
     else
     {
         MessageBox.Show("Please Select Item to Edit");
     }
 }
        private void btnAll_Pro_Click(object sender, EventArgs e)
        {
            frmItem myfrmItem = new frmItem();

            if (myfrmItem.ShowDialog() == DialogResult.Yes)
            {
                if (myfrmItem.paramProductID.Length > 0)
                {
                    this.paramProductID      = myfrmItem.paramProductID;
                    this.txtProductName.Text = myfrmItem.paramProductName;
                }
            }
        }
 private void itemToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!itemFormOpen)
     {
         frmItem item = new frmItem();
         item.MdiParent     = this;
         item.StartPosition = FormStartPosition.CenterScreen;
         item.WindowState   = FormWindowState.Maximized;
         item.Show();
         itemFormOpen = true;
     }
     else
     {
         if (Application.OpenForms.OfType <frmItem>().Count() == 1)
         {
             Application.OpenForms.OfType <frmItem>().First().BringToFront();
         }
     }
 }
Example #8
0
 private void CheckCell()
 {
     if (Game.Map.LocationOfAdventurer.HasItem)
     {
         frmItem foundItem = new frmItem();
         foundItem.ShowDialog();
         UpdateLabels();
     }
     if (Game.Map.LocationOfAdventurer.HasMonster == true && Game.Map.LocationOfAdventurer.Monster.isAlive())
     {
         frmMonster foundMonster = new frmMonster();
         foundMonster.ShowDialog();
         UpdateLabels();
     }
     if (Game.Map.LocationOfAdventurer.HasBeenSeen == false)
     {
         Game.Map.LocationOfAdventurer.HasBeenSeen = true;
     }
     showGameOver();
 }
Example #9
0
        //取项目列表

        public int m_GetItem()
        {
            DataTable dt = new DataTable();
            //frmItem objItem = new frmItem();
            string strItem = m_objViewerCollect.txt_Item.Text.ToUpper().Trim();

            this.m_objMain.m_GetItem(strItem, out dt);

            if (dt.Rows.Count <= 0)
            {
                MessageBox.Show("抱歉,没有找到对应的项目记录!", "提示 ", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return(-1);
            }

            if (dt.Rows.Count == 1)
            {
                //change 2007.5.8 zhu.w.t
                //m_objViewerCollect.txt_Item.Text = dt.Rows[0]["ITEMID_CHR"].ToString().Trim();
                //==================================================================>>
                m_objViewerCollect.txt_Item.Text = dt.Rows[0]["ITEMCODE_VCHR"].ToString().Trim();
                m_objViewerCollect.txt_Item.Tag  = dt.Rows[0]["ITEMID_CHR"].ToString().Trim();
                m_strItemCode = dt.Rows[0]["ITEMCODE_VCHR"].ToString().Trim();
                //<<=================================================================
                m_objViewerCollect.labItemName.Text = dt.Rows[0]["ITEMNAME_VCHR"].ToString().Trim();
                return(1);
            }
            else
            {
                frmItem frmItem_view = new frmItem();
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataRow dr = dt.Rows[i];

                    ListViewItem li = new ListViewItem();
                    li.SubItems.Clear();
                    //change 2007.5.8 zhu.w.t
                    //li.SubItems[0].Text = dr["ITEMID_CHR"].ToString();
                    //================================================>>
                    li.SubItems[0].Text = dr["ITEMCODE_VCHR"].ToString();
                    //<<================================================
                    li.SubItems.Add(dr["ITEMNAME_VCHR"].ToString());
                    li.Tag = dr;
                    frmItem_view.m_lsvList.Items.Add(li);
                }

                if (frmItem_view.ShowDialog() == DialogResult.OK)
                {
                    //change 2007.5.8 zhu.w.t
                    //string itemcode = frmItem_view.ItemCode;
                    //=================>>
                    string itemcode = frmItem_view.ItemCode_Vchr;
                    m_objViewerCollect.txt_Item.Tag = frmItem_view.ItemCode;
                    //<<=====================
                    string itemname = frmItem_view.ItemName;
                    m_objViewerCollect.txt_Item.Text    = itemcode;
                    m_objViewerCollect.labItemName.Text = itemname;
                    // MessageBox.Show(itemcode + "  " + itemname);
                }
                else
                {
                    m_objViewerCollect.txt_Item.Text    = string.Empty;
                    m_objViewerCollect.labItemName.Text = string.Empty;
                }
                frmItem_view.Dispose();
            }

            return(1);
        }
Example #10
0
        private void btnCreateItem_Click(object sender, EventArgs e)
        {
            frmItem form = new frmItem(0, this);

            form.Show();
        }
Example #11
0
        public static Form GetFrom(cons.WindowsList windows, string oper_id)
        {
            Form frm = new Form();

            switch (oper_id)
            {
            case "010100":
                frm = new frmRegion();
                break;

            case "010200":
                frm = new frmItemCls();
                break;

            case "010300":
                frm = new frmBranch(windows);
                break;

            case "010400":
                frm = new frmSupcust()
                {
                    runType = 0
                };
                break;

            case "010500":
                frm = new frmItem(windows);
                break;

            case "010600":
                frm = new frmDept();
                break;

            case "010700":
                frm = new frmSupcust()
                {
                    runType = 1
                };
                break;

            case "010800":
                frm = new frmPeople();
                break;

            case "020001":
                var frms = new ReportForm.frmReport();
                frms.GetPmDetail();
                frm = frms;
                break;

            case "020100":
                frm = new PriceForm.frmCustPrice();
                break;

            case "020200":
                frm = new PriceForm.frmSupPrice();
                break;

            case "020300":
                frm = new VoucherForm.OrderMerge("调价单", new VoucherForm.frmCusPriceOrderList(), new VoucherForm.frmCusPriceOrder());
                break;

            case "030001":
                frms = new ReportForm.frmReport();
                frms.GetSaleSum();
                frm = frms;
                break;

            case "030002":
                frms = new ReportForm.frmReport();
                frms.GetSaleDetail();
                frm = frms;
                break;

            case "030003":
                frms = new ReportForm.frmReport();
                frms.GetSaleOutDetail();
                frm = frms;
                break;

            case "030004":
                frms = new ReportForm.frmReport();
                frms.GetCusCredit();
                frm = frms;
                break;

            case "030005":
                frms = new ReportForm.frmReport();
                frms.GetNoSaleCus();
                frm = frms;
                break;

            case "030006":
                frms = new ReportForm.frmReport();
                frms.GetSheetPayInfo();
                frm = frms;
                break;

            case "030007":
                frms = new ReportForm.frmReport();
                frms.GetCGSum();
                frm = frms;
                break;

            case "030008":
                frms = new ReportForm.frmReport();
                frms.GetCGDetail();
                frm = frms;
                break;

            case "030100":
                frm = new VoucherForm.OrderMerge("采购入库单", new VoucherForm.frmCGInSheetList(), new VoucherForm.frmCGInSheet());
                break;

            case "030200":
                frm = frm = new VoucherForm.OrderMerge("采购退货单", new VoucherForm.frmCGOutSheetList(), new VoucherForm.frmCGOutSheet());
                break;

            case "030300":
                frm = frm = new VoucherForm.OrderMerge("批发销售单", new VoucherForm.frmSaleSheetList(), new VoucherForm.frmSaleSheet());
                break;

            case "030400":
                frm = new VoucherForm.OrderMerge("客户退货单", new VoucherForm.frmSaleInSheetList(), new VoucherForm.frmSaleInSheet());
                break;

            case "040001":
                frms = new ReportForm.frmReport();
                frms.GetICSum();
                frm = frms;
                break;

            case "040002":
                frms = new ReportForm.frmReport();
                frms.GetICFlow();
                frm = frms;
                break;

            case "040003":
                frms = new ReportForm.frmReport();
                frms.GetICOutDetail();
                frm = frms;
                break;

            case "040004":
                frms = new ReportForm.frmReport();
                frms.GetJXCSum();
                frm = frms;
                break;

            case "040006":
                frms = new ReportForm.frmReport();
                frms.GetCheckPlanDetail();
                frm = frms;
                break;

            case "040100":
                frm = new VoucherForm.OrderMerge("盘点初始化", new StockForm.frmStockPDList(), new StockForm.frmStockInit());
                break;

            case "040200":
                frm = new VoucherForm.OrderMerge("库存盘点", new VoucherForm.frmCheckSheetList(), new VoucherForm.frmCheckSheet());
                break;

            case "040300":
                frms = new ReportForm.frmReport();
                frms.GetCheckPlan();
                frm = frms;
                break;

            case "040400":
                frm = new VoucherForm.OrderMerge("盘点结束审核", new StockForm.frmStockPCList(), new StockForm.frmStockPC());
                break;

            case "040500":
                frm = new VoucherForm.OrderMerge("其他出入单", new VoucherForm.frmOtherInOutSheetList(), new VoucherForm.frmOtherInOutSheet());
                break;

            case "040600":
                frm = new VoucherForm.OrderMerge("调拨单", new VoucherForm.frmIOList(), new VoucherForm.frmIOMaster());
                break;

            case "050001":
                frms = new ReportForm.frmReport();
                frms.GetRpCusSum();
                frm = frms;
                break;

            case "050002":
                frms = new ReportForm.frmReport();
                frms.GetRpCusDetail();
                frm = frms;
                break;

            case "050003":
                frms = new ReportForm.frmReport();
                frms.GetRpSupSum();
                frm = frms;
                break;

            case "050004":
                frms = new ReportForm.frmReport();
                frms.GetRpSupDetail();
                frm = frms;
                break;

            case "050005":
                frms = new ReportForm.frmReport();
                frms.GetRpSupAccount();
                frm = frms;
                break;

            case "050006":
                frms = new ReportForm.frmReport();
                frms.GetRpCusAccount();
                frm = frms;
                break;

            case "050007":
                frms = new ReportForm.frmReport();
                frms.GetRpTodayInc();
                frm = frms;
                break;

            case "050008":
                frms = new ReportForm.frmReport();
                frms.GetRpTodayPay();
                frm = frms;
                break;

            case "050009":
                frms = new ReportForm.frmReport();
                frms.GetRpCusFyDetail();
                frm = frms;
                break;

            case "050010":
                frms = new ReportForm.frmReport();
                frms.GetRpSupFyDetail();
                frm = frms;
                break;

            case "050011":
                frms = new ReportForm.frmReport();
                frms.GetRpCashBank();
                frm = frms;
                break;

            case "050012":
                frms = new ReportForm.frmReport();
                frms.GetRpAdminCost();
                frm = frms;
                break;

            case "050100":
                frm = new FinanceForm.frmBank();
                break;

            case "050200":
                frm = new FinanceForm.frmPayment();
                break;

            case "050300":
                frm = new FinanceForm.frmIncome();
                break;

            case "050400":
                frm = new VoucherForm.OrderMerge("客户费用单", new VoucherForm.frmCusFYList(), new VoucherForm.frmCusFY());
                break;

            case "050500":
                frm = new VoucherForm.OrderMerge("供应商费用单", new VoucherForm.frmSupFYList(), new VoucherForm.frmSupFY());
                break;

            case "050600":
                frm = new VoucherForm.OrderMerge("现金银行转账单", new VoucherForm.frmCashOrderList(), new VoucherForm.frmCashOrder());
                break;

            case "050700":
                frm = new VoucherForm.OrderMerge("管理费用单", new VoucherForm.frmFYOrderList(), new VoucherForm.frmFYOrder());
                break;

            case "050800":
                frm = new VoucherForm.OrderMerge("供应商结算单", new VoucherForm.frmSupSettleList(), new VoucherForm.frmSupSettle());
                break;

            case "050900":
                frm = new VoucherForm.OrderMerge("客户结算单", new VoucherForm.frmCusSettleList(), new VoucherForm.frmCusSettle());
                break;

            case "070100":
                frm = new SysForm.frmOper();
                break;

            case "070200":
                frm     = new SysForm.SysSetting();
                frm.Tag = "1";
                break;

            case "070300":
                frm     = new SysForm.SysSetting();
                frm.Tag = "1";
                break;

            case "070400":
                frm     = new SysForm.frmRegisterList();
                frm.Tag = "1";
                break;

            case "070500":
                frm     = new SysForm.frmUpdatePwd();
                frm.Tag = "1";
                break;
            }
            return(frm);
        }