Example #1
0
    private void LoadDvsInfo(string id)
    {
        SelectDvs sd  = new SelectDvs();
        Dvs       dvs = sd.GetDvs(id);

        if (dvs != null)
        {
            mPortNum                             = DataGlobal.ConvertToInt(dvs.Portnum);
            txtAssertNo.Text                     = dvs.Assertno;
            txtBroadbandAccessNo.Text            = dvs.Broadbandaccessno;
            txtCustomerAddress.Text              = dvs.Customeraddress;
            txtCustomerManager.Text              = dvs.Customermanager;
            txtCustomerManagerPhone.Text         = dvs.Customermanager_phone;
            txtCustomerName.Text                 = dvs.Customername;
            txtDialupAccount.Text                = dvs.Dialupaccount;
            txtDialupPassword.Text               = dvs.Dialuppassword;
            txtDvsNo.Text                        = dvs.Dvsno;
            txtGateway.Text                      = dvs.Gateway;
            txtInstalldate.Text                  = dvs.Installdate.ToShortDateString();
            txtInstallPlace.Text                 = dvs.Installplace;
            txtIP.Text                           = dvs.Ip;
            txtJunctionBoxNo.Text                = dvs.Junctionboxno;
            txtLanNo.Text                        = dvs.Lanno;
            txtLinkman.Text                      = dvs.Linkman;
            txtLinkmanPhone.Text                 = dvs.Linkman_phone;
            txtPortNum.Text                      = dvs.Portnum;
            txtServiceDesc.Text                  = dvs.Servicedesc;
            txtStorageTime.Text                  = dvs.Storagetime;
            txtSubnetMask.Text                   = dvs.Subnetmask;
            txtSurfaceMan.Text                   = dvs.Surfaceman;
            txtSurfaceManPhone.Text              = dvs.Surfaceman_phone;
            ddlCustomerType.SelectedValue        = dvs.Customertype;
            ddlDeviceLevel.SelectedValue         = dvs.Devicelevel;
            ddlDeviceManu.SelectedValue          = dvs.Devicemanu;
            ddlDevicePropertyRight.SelectedValue = dvs.Devicepropertyright;
            ddlDeviceState.SelectedValue         = dvs.Devicestate;
            ddlDvsKind.SelectedValue             = dvs.Dvskind;
            ddlDvsType.SelectedValue             = dvs.Dvstype;
            ddlPaymentType.SelectedValue         = dvs.Paymenttype;
            ddlPowerType.SelectedValue           = dvs.Powertype;
            ddlPowerVoltage.SelectedValue        = dvs.Powervoltage;
            ddlServiceType.SelectedValue         = dvs.Servicetype;
            ddlStorageType.SelectedValue         = dvs.Storagetype;
            ddlSwitchinMode.SelectedValue        = dvs.Switchinmode;
            ddlSwitchinPlace.SelectedValue       = dvs.Switchinplace;
            //经纬度
            SelectDeviceXy sdxy = new SelectDeviceXy();
            Device_Info_xy xy   = sdxy.SelectByID(dvs.Id);
            if (xy != null)
            {
                txtLongitude.Text = xy.LONGITUDE.ToString();
                txtLatitude.Text  = xy.LATITUDE.ToString();
            }

            hdfSuburb.Value = dvs.Suburb;
            hdfDvsID.Value  = dvs.Id.ToString();
        }
    }
Example #2
0
    private void LoadDvsInfo(string dvsID, string port)
    {
        hlkNew.NavigateUrl  = "ResCamera.aspx?dvsid=" + dvsID;
        hlkBack.NavigateUrl = "ResEncoder.aspx?id=" + dvsID;
        SelectDvs sd  = new SelectDvs();
        Dvs       dvs = sd.GetDvs(dvsID);

        if (dvs != null)
        {
            txtDvsID.Text                = dvs.Dvsno;
            txtBroadbandAccessNo.Text    = dvs.Broadbandaccessno;
            txtCustomerManager.Text      = dvs.Customermanager;
            txtCustomerManagerPhone.Text = dvs.Customermanager_phone;
            txtLanNo.Text                = dvs.Lanno;
            txtIP.Text             = dvs.Ip;
            txtGateway.Text        = dvs.Gateway;
            txtSubnetMask.Text     = dvs.Subnetmask;
            txtDialupAccount.Text  = dvs.Dialupaccount;
            txtDialupPassword.Text = dvs.Dialuppassword;
            hdfSuburbID.Value      = dvs.Suburb;

            SelectAreas sa   = new SelectAreas();
            Areas       area = sa.GetArea(dvs.Suburb); //分局
            if (area == null)
            {
                return;
            }
            txtSuburb.Text = area.Area_Name;

            area = sa.GetParentAreas(area.ID.ToString()); //郊县
            if (area == null)
            {
                return;
            }
            txtTown.Text = area.Area_Name;
            //剩余的端口
            SelectCameras   sc      = new SelectCameras();
            IList <Cameras> list    = sc.GetCameras(Session["userid"].ToString(), Session["cityid"].ToString(), dvsID);
            int             portNum = DataGlobal.ConvertToInt(dvs.Portnum);
            for (int i = 1; i <= portNum; i++)
            {
                bool flag = false;

                for (int j = 0; j < list.Count; j++)
                {
                    if (list[j].Dvsport == i.ToString())
                    {
                        flag = true;
                    }
                }
                if (i.ToString() == port)
                {
                    flag = false;
                }
                if (!flag)
                {
                    ListItem ddlone = new ListItem(i.ToString(), i.ToString());
                    ddlDvsPort.Items.Add(ddlone);
                }
            }
            if (Request["dvsport"] != null && Request["dvsport"] != "")
            {
                ddlDvsPort.SelectedValue = Request["dvsport"].ToString();
            }
            btnModify.Enabled = true;
            hdfDvsID.Value    = dvs.Id.ToString();
        }
    }
Example #3
0
    private void LoadDvsInfo(string dvsID, string port)
    {
        hlkNew.NavigateUrl = "ResCamera.aspx?dvsid=" + dvsID;
        hlkBack.NavigateUrl = "ResEncoder.aspx?id=" + dvsID;
        SelectDvs sd = new SelectDvs();
        Dvs dvs = sd.GetDvs(dvsID);
        if (dvs != null)
        {
            txtDvsID.Text = dvs.Dvsno;
            txtBroadbandAccessNo.Text = dvs.Broadbandaccessno;
            txtCustomerManager.Text = dvs.Customermanager;
            txtCustomerManagerPhone.Text = dvs.Customermanager_phone;
            txtLanNo.Text = dvs.Lanno;
            txtIP.Text = dvs.Ip;
            txtGateway.Text = dvs.Gateway;
            txtSubnetMask.Text = dvs.Subnetmask;
            txtDialupAccount.Text = dvs.Dialupaccount;
            txtDialupPassword.Text = dvs.Dialuppassword;
            hdfSuburbID.Value = dvs.Suburb;

            SelectAreas sa = new SelectAreas();
            Areas area =sa.GetArea(dvs.Suburb); //分局
            if (area == null)
            {
                return;
            }
            txtSuburb.Text = area.Area_Name;

            area = sa.GetParentAreas(area.ID.ToString()); //郊县
            if (area == null)
            {
                return;
            }
            txtTown.Text = area.Area_Name;
            //剩余的端口
            SelectCameras sc = new SelectCameras();
            IList<Cameras> list = sc.GetCameras(Session["userid"].ToString(), Session["cityid"].ToString(), dvsID);
            int portNum = DataGlobal.ConvertToInt(dvs.Portnum);
            for (int i = 1; i <= portNum; i++)
            {
                bool flag = false;

                for (int j = 0; j < list.Count; j++)
                {
                    if (list[j].Dvsport == i.ToString())
                    {
                        flag = true;
                    }
                }
                if (i.ToString() == port)
                {
                    flag = false;
                }
                if (!flag)
                {
                    ListItem ddlone = new ListItem(i.ToString(), i.ToString());
                    ddlDvsPort.Items.Add(ddlone);
                }
            }
            if (Request["dvsport"] != null && Request["dvsport"] != "")
            {
                ddlDvsPort.SelectedValue = Request["dvsport"].ToString();
            }
            btnModify.Enabled = true;
            hdfDvsID.Value = dvs.Id.ToString();
        }
    }
Example #4
0
    private void LoadDvsInfo(string id)
    {
        SelectDvs sd = new SelectDvs();
        Dvs dvs = sd.GetDvs(id);
        if (dvs != null)
        {
            mPortNum = DataGlobal.ConvertToInt(dvs.Portnum);
            txtAssertNo.Text = dvs.Assertno;
            txtBroadbandAccessNo.Text = dvs.Broadbandaccessno;
            txtCustomerAddress.Text = dvs.Customeraddress;
            txtCustomerManager.Text = dvs.Customermanager;
            txtCustomerManagerPhone.Text = dvs.Customermanager_phone;
            txtCustomerName.Text = dvs.Customername;
            txtDialupAccount.Text = dvs.Dialupaccount;
            txtDialupPassword.Text = dvs.Dialuppassword;
            txtDvsNo.Text = dvs.Dvsno;
            txtGateway.Text = dvs.Gateway;
            txtInstalldate.Text = dvs.Installdate.ToShortDateString();
            txtInstallPlace.Text = dvs.Installplace;
            txtIP.Text = dvs.Ip;
            txtJunctionBoxNo.Text = dvs.Junctionboxno;
            txtLanNo.Text = dvs.Lanno;
            txtLinkman.Text = dvs.Linkman;
            txtLinkmanPhone.Text = dvs.Linkman_phone;
            txtPortNum.Text = dvs.Portnum;
            txtServiceDesc.Text = dvs.Servicedesc;
            txtStorageTime.Text = dvs.Storagetime;
            txtSubnetMask.Text = dvs.Subnetmask;
            txtSurfaceMan.Text = dvs.Surfaceman;
            txtSurfaceManPhone.Text = dvs.Surfaceman_phone;
            ddlCustomerType.SelectedValue = dvs.Customertype;
            ddlDeviceLevel.SelectedValue = dvs.Devicelevel;
            ddlDeviceManu.SelectedValue = dvs.Devicemanu;
            ddlDevicePropertyRight.SelectedValue = dvs.Devicepropertyright;
            ddlDeviceState.SelectedValue = dvs.Devicestate;
            ddlDvsKind.SelectedValue = dvs.Dvskind;
            ddlDvsType.SelectedValue = dvs.Dvstype;
            ddlPaymentType.SelectedValue = dvs.Paymenttype;
            ddlPowerType.SelectedValue = dvs.Powertype;
            ddlPowerVoltage.SelectedValue = dvs.Powervoltage;
            ddlServiceType.SelectedValue = dvs.Servicetype;
            ddlStorageType.SelectedValue = dvs.Storagetype;
            ddlSwitchinMode.SelectedValue = dvs.Switchinmode;
            ddlSwitchinPlace.SelectedValue = dvs.Switchinplace;
            //经纬度
            SelectDeviceXy sdxy = new SelectDeviceXy();
            Device_Info_xy xy = sdxy.SelectByID(dvs.Id);
            if (xy != null)
            {
                txtLongitude.Text = xy.LONGITUDE.ToString();
                txtLatitude.Text = xy.LATITUDE.ToString();
            }

            hdfSuburb.Value = dvs.Suburb;
            hdfDvsID.Value = dvs.Id.ToString();
        }
    }