Beispiel #1
0
        public CurrencyInfo(string currencyCode)
        {
            InitializeComponent();
            updateLanguage();

            _currencyCode = currencyCode;
            _mode         = String.IsNullOrEmpty(_currencyCode) ? DataActionMode.Add : DataActionMode.Edit;
            lbMode.Text   = vars.LANG_USE != "EN" ? _mode.ToString() : _mode.ToString();
        }
Beispiel #2
0
        public SKUinfo(string SKUCode)
        {
            InitializeComponent();

            _skuCode    = SKUCode;
            _mode       = String.IsNullOrEmpty(_skuCode) ? DataActionMode.Add : DataActionMode.Edit;
            lbMode.Text = _mode.ToString();
        }
Beispiel #3
0
        public WHLocInfo(string Code)
        {
            InitializeComponent();

            _whCode     = Code;
            _mode       = String.IsNullOrEmpty(_whCode) ? DataActionMode.Add : DataActionMode.Edit;
            lbMode.Text = _mode.ToString();
        }
Beispiel #4
0
        public AccountGroupInfo(string AccountCode)
        {
            InitializeComponent();

            _mode       = String.IsNullOrEmpty(AccountCode) ? DataActionMode.Add : DataActionMode.Edit;
            lbMode.Text = _mode.ToString();

            GetAccountInfo(AccountCode);
        }
Beispiel #5
0
        public UOMInfo(string UOMName)
        {
            InitializeComponent();

            _mode       = String.IsNullOrEmpty(UOMName) ? DataActionMode.Add : DataActionMode.Edit;
            lbMode.Text = _mode.ToString();

            GetUOMInfo(UOMName);
        }
Beispiel #6
0
 public ExchangeInfo(string code, int exchangeId)
 {
     InitializeComponent();
     updateLanguage();
     _code       = code;
     _exchangeId = exchangeId;
     _mode       = _exchangeId == 0 ? DataActionMode.Add : DataActionMode.Edit;
     lbMode.Text = _mode.ToString();
 }
Beispiel #7
0
        public ItemCatInfo(string CatCode)
        {
            InitializeComponent();

            _catCode = CatCode;
            _mode    = String.IsNullOrEmpty(_catCode) ? DataActionMode.Add : DataActionMode.Edit;

            lbMode.Text = _mode.ToString();
        }
Beispiel #8
0
        public MemberInfo(string UserName)
        {
            InitializeComponent();

            _mode       = String.IsNullOrEmpty(UserName) ? DataActionMode.Add : DataActionMode.Edit;
            lbMode.Text = _mode.ToString();

            GetPermissions();
            GetUserInfo(UserName);
        }
Beispiel #9
0
        public LangItem(string keyWord)
        {
            InitializeComponent();

            _keyword    = keyWord;
            _mode       = String.IsNullOrEmpty(keyWord) ? DataActionMode.Add : DataActionMode.Edit;
            lbMode.Text = _mode.ToString();

            GetItemLanguageInfo(_keyword);
        }
Beispiel #10
0
        public SysConfig(DataActionMode mode)
        {
            InitializeComponent();
            updateLangauge();

            _mode       = mode;
            lbMode.Text = _mode.ToString();

            getLang();
        }
Beispiel #11
0
        public AddrInfo(DeliveryAddr addr, DataActionMode custMode, DataActionMode addrMode)
        {
            InitializeComponent();
            Address   = addr;
            _custMode = custMode;
            _addrMode = addrMode;

            lbMode.Text         = _addrMode.ToString();
            lbCustomerCode.Text = Address.CustCode;
        }
Beispiel #12
0
        public VendorInfo(string vendorCode)
        {
            InitializeComponent();

            _vendorCode = vendorCode;
            _mode       = String.IsNullOrEmpty(vendorCode) ? DataActionMode.Add : DataActionMode.Edit;
            lbMode.Text = _mode.ToString();
            getCurrency();
            getVendorStatus();
            getVendorType();
        }
Beispiel #13
0
        public SysSetting(string ProfileId, DataActionMode Mode = DataActionMode.Add)
        {
            InitializeComponent();
            getLang();
            getHomeCurrency();
            getSourchCurrency();
            getUOMs();
            getWarehouses();
            getCreditTerm();

            _mode       = Mode;
            _companyId  = ProfileId;
            lbMode.Text = _mode.ToString();
            GetProfile(_companyId);
        }
Beispiel #14
0
        public StockIssueInfo(String SKCode, String IssueNo)
        {
            InitializeComponent();
            _issueNo = IssueNo;
            _skCode  = SKCode;
            _mode    = String.IsNullOrEmpty(_issueNo) ? DataActionMode.Add : DataActionMode.Edit;

            utils.utilcore.SettingDataGrid(ref dgv);

            lbMode.Text = _mode.ToString();
            lbCode.Text = _skCode;

            getCurrency();
            getIssueReason();
        }
Beispiel #15
0
        public StockReceiveItem(string SKCode, string DocNum, int recordId, int ItemId, DataActionMode docMode)
        {
            InitializeComponent();
            _docMode  = docMode;
            _SKCode   = SKCode;
            _docNo    = DocNum;
            _itemId   = ItemId;
            _recordId = recordId;
            _mode     = (recordId == 0 ? DataActionMode.Add : DataActionMode.Edit);

            lbCode.Text  = _SKCode;
            lbDocId.Text = _docNo;
            grpItem.Text = $"Stock Item [{_mode.ToString()}]";
            getUnits();
        }
Beispiel #16
0
        public StockReceiveInfo(string SKCode, string docNum)
        {
            InitializeComponent();

            utils.utilcore.SettingDataGrid(ref dgv);

            _SKCode = SKCode;
            _docNum = docNum;
            _mode   = String.IsNullOrEmpty(docNum) ? DataActionMode.Add : DataActionMode.Edit;

            lbMode.Text = _mode.ToString();
            lbCode.Text = _SKCode;

            getCurrency();
            getReason();
        }
Beispiel #17
0
        public ItemInfo(string itemNo)
        {
            InitializeComponent();

            _itemNo = itemNo;

            _mode        = (String.IsNullOrEmpty(_itemNo) ? DataActionMode.Add : DataActionMode.Edit);
            _itemPicMode = _mode == DataActionMode.Add ? DataActionMode.Add : DataActionMode.None;
            lbMode.Text  = _mode.ToString();

            getCurrency();
            getCategories();
            getAccountGroups();
            getWarehouses();
            getSKUs();
            getUOMs();
        }
Beispiel #18
0
        public CustomerInfo(string customerCode)
        {
            InitializeComponent();
            _customerCode = customerCode;

            _custMode   = String.IsNullOrEmpty(_customerCode) ? DataActionMode.Add : DataActionMode.Edit;
            lbMode.Text = _custMode.ToString();

            //utils.utilcore.SettingDataGrid(ref dgvAddr);

            dgvAddr.DoubleBuffered(true);
            dgvAddr.SettingDataGrid();

            getCustomerType();
            getIndustrials();
            getCR();
            getDeliveryAddOption();
            getCurrency();
            getCustomerStatus();
        }
Beispiel #19
0
        public StockIssueItem(string SKCode, string IssueNo, int IssueItemId, DataActionMode IssueMode, DataActionMode IssueItemMode)
        {
            InitializeComponent();

            //utils.utilcore.SettingDataGrid(ref dgv);
            dgv.DoubleBuffered(true);
            dgv.SettingDataGrid();

            _skCode        = SKCode;
            _issueNo       = IssueNo;
            _issueId       = IssueItemId;
            _issueMode     = IssueMode;
            _issueItemMode = IssueItemMode;

            lbCode.Text    = _skCode;
            lbIssueNo.Text = _issueNo;
            lbItemId.Text  = IssueItemId.ToString();

            grpItem.Text = $"Stock Issue Item [{_issueItemMode.ToString()}]";

            getUnits();
        }
Beispiel #20
0
        private void getItemInfo(string itemno)
        {
            switch (_mode)
            {
            case DataActionMode.Add:
                _itemMaster               = new data.ItemMaster();
                _itemMaster.ItemId        = 0;
                _itemMaster.WeightFactor  = 1.0m;
                _itemMaster.MaxQty        = 0m;
                _itemMaster.MinQty        = 0m;
                _itemMaster.ReorderQty    = 0m;
                _itemMaster.AccGroup      = "CONSUME";
                _itemMaster.CatCode       = "MC";
                _itemMaster.CreateBy      = vars.USER_NAME;
                _itemMaster.CreateDate    = DateTime.Now;
                _itemMaster.ImageLocate   = "";
                _itemMaster.InActive      = false;
                _itemMaster.IsStockItem   = true;
                _itemMaster.ModifyBy      = vars.USER_NAME;
                _itemMaster.ModifyDate    = DateTime.Now;
                _itemMaster.StockUnit     = "PC";
                _itemMaster.UnitWeight    = 0.00m;
                _itemMaster.VendorId      = "";
                _itemMaster.VendorItemNo  = "";
                _itemMaster.Warehouse     = "WHSHOP";
                _itemMaster.WeightUnit    = "KG";
                _itemMaster.barcode       = null;
                _itemMaster.UnitSellPrice = 0.00m;
                _itemMaster.AvgUnitCost   = 0.00m;
                _itemMaster.Brand         = "";
                _itemMaster.Dimension     = "";
                _itemMaster.Currency      = "USD";

                break;

            case DataActionMode.Edit:
                _itemMaster = new ItemMasterDAL().getItemMasterById(itemno);
                break;
            }

            chkInActive.Checked   = _itemMaster.InActive;
            chkStockItem.Checked  = _itemMaster.IsStockItem;
            txtItemDesc.Text      = _itemMaster.ItemName;
            txtItemNo.Text        = _itemMaster.ItemNo;
            txtUnitFactor.Text    = $"{_itemMaster.WeightFactor:N4}";
            txtVendorCode.Text    = _itemMaster.VendorId;
            txtVendorItem.Text    = _itemMaster.VendorItemNo;
            txtVendorName.Text    = (_mode == DataActionMode.Edit ? (String.IsNullOrEmpty(_itemMaster.VendorId) ? "" :  getVendorName(_itemMaster.VendorId)) : "");
            txtReorderQ.Text      = $"{_itemMaster.ReorderQty:N2}";
            txtMaxQStock.Text     = $"{_itemMaster.MaxQty:N2}";
            txtMinQStock.Text     = $"{_itemMaster.MinQty}";
            txtUnitWeight.Text    = $"{_itemMaster.UnitWeight:N4}";
            txtUnitSellPrice.Text = $"{_itemMaster.UnitSellPrice:N2}";
            txtAvgCost.Text       = $"{_itemMaster.AvgUnitCost:N2}";
            txtUnitFactor.Text    = $"{_itemMaster.WeightFactor:N4}";
            txtBrand.Text         = _itemMaster.Brand;
            txtDimension.Text     = _itemMaster.Dimension;

            barcodePic.Image = _itemMaster.barcode == null ? null : _itemMaster.barcode.ToImageFromByte();

            cbxACC.SelectedValue      = _itemMaster.AccGroup;
            cbxCAT.SelectedValue      = _itemMaster.CatCode;
            cbxSKU.SelectedValue      = _itemMaster.StockUnit;
            cbxUOM.Text               = _itemMaster.WeightUnit;
            cbxCurrency.SelectedValue = _itemMaster.Currency;
            cbxWH.SelectedValue       = _itemMaster.Warehouse;

            lbItemId.Text = $"{_itemMaster.ItemId}";

            // get item image
            if (_mode == DataActionMode.Edit)
            {
                _itemMasterPic = new ItemMasterPicDAL().getItemPictureById(_itemMaster.ItemNo);
                _itemPicMode   = _itemMasterPic == null ? DataActionMode.Add : DataActionMode.Edit;

                if (_itemMasterPic != null)
                {
                    picMaster.Image = _itemMasterPic.ItemPic == null ? null : _itemMasterPic.ItemPic.ToImageFromByte();
                }
            }
            else
            {
                _itemPicMode = DataActionMode.Add;
            }

            lbPicMode.Text = _itemPicMode.ToString();

            updateUI();
        }