Exemplo n.º 1
0
        private void btnDetails_Click(object sender, EventArgs e)
        {
            CptyAgreement agreement = null;
            DataRow       dr        = null;

            try
            {
                if (gridViewAgreements.IsValidRowHandle(gridViewAgreements.FocusedRowHandle))
                {
                    dr        = gridViewAgreements.GetDataRow(gridViewAgreements.FocusedRowHandle);
                    agreement = CollectionHelper.CreateObjectFromDataRow <CptyAgreement>(dr);
                    frmAgreementDetail agreementDetails = new frmAgreementDetail(cptyInfo, agreement);
                    agreementDetails.ShowDialog();
                }
                else
                {
                    XtraMessageBox.Show("Please select a valid Agreement.");
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show("An error occurred while getting the active document filename." + Environment.NewLine +
                                    "Error CNF-221 in " + FORM_NAME + ".btnDetails_Click(): " + ex.Message,
                                    FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 2
0
        public frmAgreementDetail(CptyInfo cptyInfo, CptyAgreement details)
        {
            InitializeComponent();
            this.cptyInfo = cptyInfo;
            this.details  = details;

            DisplayAgreementDetail();
        }
Exemplo n.º 3
0
        //Called from: frmEditContracts.ViewCptyInfo
        //Returned from: ConfirmProcessor.getCptyInfo
        //Data source:
        //Cpty Info:
        //"select short_name,legal_name,str_addr_1,str_addr_2, " +
        //"str_addr_3,city,state_prov_code, country_code,postal_code  " +
        //" from cpty.v_cpty_address where short_name=?";
        //Cpty Phone no:
        //"select phone_type_code,country_phone_code,area_code,local_number " +
        //" from cpty.v_cpty_phone_fax where short_name = ?";
        //public CptyInfo GetInfo(string pShortName)
        //{
        //    var result = new CptyInfo();
        //    result = GetInfoStub();

        //    return result;
        //}

        //Called from frmEditContract.ViewCptyInfo
        //Returned from: confirmationService.getCptyAgreementList(cptyAgreements);
        //Data source:
        //"select agrmnt_type_code,status_ind,date_signed,termination_dt,se_agrmnt_contact_name," +
        //"cmt,id,se_cpty_id,cpty_id,se_cpty_sn,cpty_sn " +
        //"from cpty.v_cpty_agreements " +
        //"where cpty_sn = ?";
        public List <CptyAgreement> GetAgreementList(string pCptySN, string pBookingCoSN)
        {
            var    result    = new List <CptyAgreement>();
            string xmlResult = String.Empty;

            string[] parms  = new string[] { pCptySN, pBookingCoSN };
            string   urlStr = WSUtils.getUrlStr(cptyInfoAPIServiceUrlStr, GET_AGREEMENT_LIST, parms);

            xmlResult = WSUtils.getWebServiceUrlResult(urlStr);

            XmlDocument xDoc = new XmlDocument();

            if (xmlResult.Length > 1)
            {
                xDoc.LoadXml(xmlResult);
                //string filename = @"C:\Users\ifrankel\AppDev\VS2013Projects\CptyInfoAPIServices\CptyInfoAPIService\XML\Error\CptyInfoResponse.xml";
                //xDoc.Load(filename);

                XmlNodeList agreements = xDoc.GetElementsByTagName("Agreement");
                if (agreements.Count > 1)
                {
                    foreach (XmlNode node in agreements)
                    {
                        CptyAgreement cptyAgrData = new CptyAgreement();
                        cptyAgrData.AgrmntTypeCode  = node["AgrmntType"].InnerText;
                        cptyAgrData.StatusInd       = node["StatusInd"].InnerText;
                        cptyAgrData.DateSigned      = node["DateSigned"].InnerText;
                        cptyAgrData.TerminationDt   = node["TerminationDt"].InnerText;
                        cptyAgrData.SeCptyShortName = node["BookingCoSn"].InnerText;
                        cptyAgrData.CptyShortName   = node["CptySn"].InnerText;
                        result.Add(cptyAgrData);
                    }
                }
            }

            return(result);
        }