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(); }
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(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ValidatorFactory.CreateRequiredValidator(rfvCameraNo, txtCameraNo, "请输入摄像头编号"); ValidatorFactory.CreateRequiredValidator(rfvCustomerAddress, txtCustomerAddress, "请输入用户地址"); ValidatorFactory.CreateRequiredValidator(rfvCustomerName, txtCustomerName, "请输入用户名称"); ValidatorFactory.CreateDoubleRangeValidator(RangeValidator1, txtLongitude, 180, -180); ValidatorFactory.CreateDoubleRangeValidator(RangeValidator2, txtLatitude, 90, -90); //字典 DataGlobal.LoadDictType(ddlBaudrate, DicType.BaudRate); DataGlobal.LoadDictType(ddlCameraKind, DicType.CaremaKind); DataGlobal.LoadDictType(ddlCameraType, DicType.CaremaType); DataGlobal.LoadDictType(ddlCodeAddr, DicType.CodeAddr); DataGlobal.LoadDictType(ddlCodeStream, DicType.CodeStream); DataGlobal.LoadDictType(ddlControlProtocol, DicType.ControlProtocol); 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(ddlInstallMode, DicType.InstallMode); DataGlobal.LoadDictType(ddlPaymentType, DicType.PaymentType); DataGlobal.LoadDictType(ddlPowerType, DicType.PowerType); DataGlobal.LoadDictType(ddlPowerVoltage, DicType.PowerVoltage); DataGlobal.LoadDictType(ddlStorageType, DicType.StorageType); DataGlobal.LoadDictType(ddlSwitchinMode, DicType.SWITCHINMODE); DataGlobal.LoadDictType(ddlSwitchinPlace, DicType.SWITCHINPLACE); hdfCameraID.Value = "0"; btnModify.Enabled = false; if (Request["id"] != null && Request["id"] != "") { LoadCameraInfo(Request["id"].ToString()); btnModify.Text = "确定修改"; } else if (Request["dvsid"] != null && Request["dvsid"] != "") { LoadDvsInfo(Request["dvsid"].ToString(), "0"); btnModify.Text = "确定新增"; } } }