예제 #1
0
        protected void ddlContractNumber_SelectedIndexChanged(object sender, EventArgs e)
        {
            try {
                int contractNo = ContractNumber;
                if (IsChangedSHID)
                {
                    GetShareholder(SHID, CropYear);
                }

                if (contractNo > 0)
                {
                    ResetContract();
                    ResetField();

                    GetContractBrowse(0, contractNo, CropYear, false);
                    Common.UILib.SelectDropDownValue(ddlContractNumber, ContractNumber.ToString());
                    SetSequenceNumber(SequenceNumberMax);
                }
                else
                {
                    SetSequenceNumber(0, 0);
                    ResetContract();
                    ResetField();
                }

                // Raise event to container
                ContractSelectorEventArgs cntArg = new ContractSelectorEventArgs();
                OnContractNumberChange(cntArg);
            }
            catch (Exception ex) {
                // Raise event to container
                ContractSelectorEventArgs cntArg = new ContractSelectorEventArgs(ex);
                OnContractNumberChange(cntArg);
            }
        }
예제 #2
0
        protected void btnNextContractNo_Click(object sender, EventArgs e)
        {
            try {
                int iOrigContractNo = ContractNumber;

                ResetShareholder();
                ResetContract();
                ResetField();

                GetContractBrowseNext(0, iOrigContractNo, CropYear, true);

                if (iOrigContractNo == ContractNumber)
                {
                    _eventWarningMsg = "You are currently viewing the last Contract in the system for this Agriculturist.  There isn't a Next Contract.";
                }

                GetShareholder(SHID, CropYear);
                ShowShareholder();
                GetContractList(SHID, CropYear);
                Common.UILib.SelectDropDownValue(ddlContractNumber, ContractNumber.ToString());
                SetSequenceNumber(SequenceNumberMax);

                // Raise event to container
                ContractSelectorEventArgs cntArg = new ContractSelectorEventArgs();
                OnContractNumberNext(cntArg);
            }
            catch (Exception ex) {
                // Raise event to container
                ContractSelectorEventArgs cntArg = new ContractSelectorEventArgs(ex);
                OnContractNumberNext(cntArg);
            }
        }
예제 #3
0
        private void BeetTransferRequest()
        {
            try {
                CropYear = _shs.CropYear;
                int shid           = _shs.SHID;
                int contractID     = _fld.ContractID;
                int sequenceNumber = _fld.SequenceNumber;

                txtQueryAction.Text += " * BeetTransferRequest: cy: " + CropYear.ToString() + "; shid: " + shid.ToString() +
                                       "; contractID: " + contractID.ToString() + "; sequenceNumber: " + sequenceNumber.ToString();

                ResetShareholder();
                ResetContract();
                ResetField();

                GetContractBrowse(contractID, 0, CropYear, false);

                GetShareholder(shid, CropYear);
                ShowShareholder();
                GetContractList(shid, CropYear);
                Common.UILib.SelectDropDownValue(ddlContractNumber, ContractNumber.ToString());
                SetSequenceNumber(SequenceNumberMax, sequenceNumber);
            }
            catch (Exception ex) {
                Common.CException wex = new Common.CException(MOD_NAME + ".InitControl", ex);
                throw (wex);
            }
        }
예제 #4
0
        //override//

        public override string ToString()
        {
            return(ContractNumber.ToString());
        }
예제 #5
0
 public string GetReference()
 {
     return((Type == ContractType.Purchase ? "P" : "S")
            + ContractNumber.ToString("00000", CultureInfo.InvariantCulture) + ".000");
 }