protected void btnEditPort_Click(object sender, EventArgs e)
        {
            MDMSVC.DC_Message    _msg    = new MDMSVC.DC_Message();
            MDMSVC.DC_PortMaster _newObj = new MDMSVC.DC_PortMaster();
            _newObj.Port_Id       = Guid.Parse(Port_ID);
            _newObj.OAG_loc       = txtOAG_loc.Text;
            _newObj.OAG_multicity = txtOAG_multicity.Text;
            _newObj.Oag_lon       = txtoag_lon.Text;
            _newObj.Oag_inactive  = txtoag_inactive.Text;
            _newObj.MappingStatus = txtMappingStatus.Text;
            _newObj.Oag_ctryname  = txtoag_ctryname.Text;
            _newObj.Oag_state     = txtoag_state.Text;
            _newObj.Oag_substate  = txtoag_substate.Text;
            _newObj.Oag_timediv   = txtoag_timediv.Text;
            _newObj.Oag_lat       = txtoag_lat.Text;
            _newObj.OAG_type      = txtOAG_type.Text;
            _newObj.OAG_subtype   = txtOAG_subtype.Text;
            _newObj.Oag_name      = txtoag_name.Text;
            _newObj.Oag_portname  = txtoag_portname.Text;
            _newObj.Oag_ctry      = txtoag_ctry.Text;
            _newObj.Oag_subctry   = txtoag_subctry.Text;
            _newObj.City_Id       = Guid.Parse(ddlCityEdit.SelectedValue);
            _newObj.Country_Id    = Guid.Parse(ddlCountryEdit.SelectedValue);
            _newObj.State_Id      = Guid.Parse(ddlStateEdit.SelectedValue);

            _msg = _objMaster.UpdatePortMaster(_newObj);
            BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
        }
Exemple #2
0
        public MDMSVC.DC_Message AddPortMaster(MDMSVC.DC_PortMaster RQParams)
        {
            object result = null;

            ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Masters_PortAdd"], RQParams, typeof(MDMSVC.DC_PortMaster), typeof(MDMSVC.DC_Message), out result);
            return(result as DC_Message);
        }
Exemple #3
0
        protected void frmPortdetail_ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            #region Get Controls
            //Getting all controls here
            TextBox txtoag_portname  = (TextBox)frmPortdetail.FindControl("txtoag_portname");
            TextBox txtOAG_loc       = (TextBox)frmPortdetail.FindControl("txtOAG_loc");
            TextBox txtOAG_multicity = (TextBox)frmPortdetail.FindControl("txtOAG_multicity");
            TextBox txtoag_inactive  = (TextBox)frmPortdetail.FindControl("txtoag_inactive");
            TextBox txtMappingStatus = (TextBox)frmPortdetail.FindControl("txtMappingStatus");
            TextBox txtoag_ctryname  = (TextBox)frmPortdetail.FindControl("txtoag_ctryname");
            TextBox txtoag_state     = (TextBox)frmPortdetail.FindControl("txtoag_state");

            TextBox txtoag_substate = (TextBox)frmPortdetail.FindControl("txtoag_substate");
            TextBox txtoag_timediv  = (TextBox)frmPortdetail.FindControl("txtoag_timediv");
            TextBox txtoag_lat      = (TextBox)frmPortdetail.FindControl("txtoag_lat");
            TextBox txtOAG_type     = (TextBox)frmPortdetail.FindControl("txtOAG_type");

            TextBox txtOAG_subtype = (TextBox)frmPortdetail.FindControl("txtOAG_subtype");
            TextBox txtoag_name    = (TextBox)frmPortdetail.FindControl("txtoag_name");
            TextBox txtoag_ctry    = (TextBox)frmPortdetail.FindControl("txtoag_ctry");
            TextBox txtoag_subctry = (TextBox)frmPortdetail.FindControl("txtoag_subctry");
            TextBox txtoag_lon     = (TextBox)frmPortdetail.FindControl("txtoag_lon");


            DropDownList ddlCountryEdit = (DropDownList)frmPortdetail.FindControl("ddlCountryEdit");
            DropDownList ddlStateEdit   = (DropDownList)frmPortdetail.FindControl("ddlStateEdit");
            DropDownList ddlCityEdit    = (DropDownList)frmPortdetail.FindControl("ddlCityEdit");

            #endregion
            if (e.CommandName == "Add")
            {
                MDMSVC.DC_Message    _msg    = new MDMSVC.DC_Message();
                MDMSVC.DC_PortMaster _newObj = new MDMSVC.DC_PortMaster();
                _newObj.Port_Id       = Guid.NewGuid();
                _newObj.OAG_loc       = Convert.ToString(txtOAG_loc.Text);
                _newObj.OAG_multicity = Convert.ToString(txtOAG_multicity.Text);
                _newObj.OAG_type      = Convert.ToString(txtoag_lon.Text);
                _newObj.Oag_inactive  = Convert.ToString(txtoag_inactive.Text);
                _newObj.MappingStatus = Convert.ToString(txtMappingStatus.Text);
                _newObj.Oag_ctryname  = Convert.ToString(txtoag_ctryname.Text);
                _newObj.Oag_state     = Convert.ToString(txtoag_state.Text);
                _newObj.Oag_substate  = Convert.ToString(txtoag_substate.Text);
                _newObj.Oag_timediv   = Convert.ToString(txtoag_timediv.Text);
                _newObj.Oag_lat       = Convert.ToString(txtoag_lat.Text);
                _newObj.OAG_type      = Convert.ToString(txtOAG_type.Text);
                _newObj.OAG_subtype   = Convert.ToString(txtOAG_subtype.Text);
                _newObj.Oag_name      = Convert.ToString(txtoag_name.Text);
                _newObj.Oag_portname  = Convert.ToString(txtoag_portname.Text);
                _newObj.Oag_ctry      = Convert.ToString(txtoag_ctry.Text);
                _newObj.Oag_subctry   = Convert.ToString(txtoag_subctry.Text);
                _newObj.City_Id       = Guid.Parse(ddlCityEdit.SelectedValue);
                _newObj.Country_Id    = Guid.Parse(ddlCountryEdit.SelectedValue);
                _newObj.State_Id      = Guid.Parse(ddlStateEdit.SelectedValue);
                _msg          = _serviceMaster.AddPortMaster(_newObj);
                hdnFlag.Value = "true";
                BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode);
            }
        }