Exemplo n.º 1
0
        public void DisplayData(string itemID = "-1")
        {
            try
            {
                if (itemID == "-1")
                {
                    //New Item
                    //Get Item code
                    txtPartyID.Text = GlobalFunction.GetUniqueCode("PartyMaster");
                }
                else
                {
                    //Existing Item
                    PartyMaster objHandler = new PartyMaster();
                    PartyMaster obj        = objHandler.GetPartyMasterDetails(itemID);
                    if (obj != null)
                    {
                        ClearControl();
                        SetItem(obj);
                    }
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(System.Reflection.MethodBase.GetCurrentMethod().Name + "\n" + ex.Message);
            }
        }
Exemplo n.º 2
0
 private void ClickAdd()
 {
     //get new id for book
     AddMode  = true;
     EditMode = false;
     ClearControl();
     ControlStatus(false);
     txtTranID.Text = GlobalFunction.GetUniqueCode("TransactionOutMaster");
 }