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);
            }
        }
Exemple #2
0
 private void ClickAdd()
 {
     //get new id for book
     AddMode  = true;
     EditMode = false;
     ClearControl();
     ControlStatus(false);
     txtTranID.Text = GlobalFunction.GetUniqueCode("TransactionOutMaster");
 }