示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //校验
            ValidatorFactory.CreateRequiredValidator(rfvDvsNo, txtDvsNo, "请输入DVS编号");
            ValidatorFactory.CreateRequiredValidator(rfvJunctionBoxNo, txtJunctionBoxNo, "请输入分线盒编号");
            ValidatorFactory.CreateRequiredValidator(rfvCustomerAddress, txtCustomerAddress, "请输入用户地址");
            ValidatorFactory.CreateRequiredValidator(rfvCustomerName, txtCustomerName, "请输入用户名称");
            ValidatorFactory.CreateRequiredValidator(rfvPortNum, txtPortNum, "请输入端口数");
            ValidatorFactory.CreateDoubleRangeValidator(RangeValidator1, txtLongitude, 180, -180);
            ValidatorFactory.CreateDoubleRangeValidator(RangeValidator2, txtLatitude, 90, -90);
            ValidatorFactory.CreateIntegerValidator(revPortNum, txtPortNum);
            ValidatorFactory.CreateDoubleRangeValidator(rvdPortNum, txtPortNum, 16, 1);
            //字典
            DataGlobal.LoadDictType(ddlCustomerType, DicType.CustomerType);
            DataGlobal.LoadDeviceLevel(ddlDeviceLevel);
            DataGlobal.LoadDictType(ddlDeviceManu, DicType.DeviceManu);
            DataGlobal.LoadDictType(ddlDevicePropertyRight, DicType.DevicePropertyRight);
            DataGlobal.LoadDictType(ddlDeviceState, DicType.DeviceState);
            DataGlobal.LoadDictType(ddlDvsKind, DicType.DvsKind);
            DataGlobal.LoadDictType(ddlDvsType, DicType.DvsType);
            DataGlobal.LoadDictType(ddlPaymentType, DicType.PaymentType);
            DataGlobal.LoadDictType(ddlPowerType, DicType.PowerType);
            DataGlobal.LoadDictType(ddlPowerVoltage, DicType.PowerVoltage);
            DataGlobal.LoadDictType(ddlServiceType, DicType.ServiceType);
            DataGlobal.LoadDictType(ddlStorageType, DicType.StorageType);
            DataGlobal.LoadDictType(ddlSwitchinMode, DicType.SWITCHINMODE);
            DataGlobal.LoadDictType(ddlSwitchinPlace, DicType.SWITCHINPLACE);
            //行政区
            DataGlobal.LoadTown(ddlTown, Session["userid"].ToString());

            hdfDvsID.Value = "0";
            if (Request["id"] != null && Request["id"] != "")
            {
                LoadDvsInfo(Request["id"].ToString());
            }
            LoadCameras();
        }
        if (hdfDvsID.Value == "0")
        {
            btnModify.Text = "确定新增";
        }
        else
        {
            btnModify.Text = "确定修改";
        }
        LoadArea();
    }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //字典
         DataGlobal.LoadDictType(ddlDvsKind, DicType.DvsKind);
         DataGlobal.LoadDictType(ddlDvsType, DicType.DvsType);
         DataGlobal.LoadDictType(ddlDeviceManu, DicType.DeviceManu);
         DataGlobal.LoadDictType(ddlDevicePropertyRight, DicType.DevicePropertyRight);
         DataGlobal.LoadDeviceLevel(ddlDeviceLevel);
         DataGlobal.LoadDictType(ddlDeviceState, DicType.DeviceState);
         DataGlobal.LoadDictType(ddlPowerType, DicType.PowerType);
         DataGlobal.LoadDictType(ddlCustomerType, DicType.CustomerType);
         DataGlobal.LoadTown(ddlTown, Session["userid"].ToString());
         DataGlobal.SetGridStyle(gvwDvs, "con_list");
     }
     LoadArea();
 }