本文整理汇总了C#中CameraManager.NewCamera方法的典型用法代码示例。如果您正苦于以下问题:C# CameraManager.NewCamera方法的具体用法?C# CameraManager.NewCamera怎么用?C# CameraManager.NewCamera使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CameraManager
的用法示例。
在下文中一共展示了CameraManager.NewCamera方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnModify_Click
protected void btnModify_Click(object sender, EventArgs e)
{
Cameras c = new Cameras();
c.Assertno = txtAssertNo.Text;
c.Caremano = txtCameraNo.Text;
c.Customeraddress = txtCustomerAddress.Text;
c.Customername = txtCustomerName.Text;
c.Handleno = txtHandleNo.Text;
c.Info = txtInfo.Text;
c.Installdate = txtInstalldate.Text.Trim() == "" ? DateTime.Now : Convert.ToDateTime(txtInstalldate.Text.Trim());
c.Installplace = txtInstallPlace.Text;
c.Junctionboxno = txtJunctionBoxNo.Text;
c.Latitude = txtLatitude.Text.Trim() == "" ? 0 : Convert.ToDouble(txtLatitude.Text.Trim());
c.Linkman = txtLinkman.Text;
c.Linkman_phone = txtLinkmanPhone.Text;
c.Longitude = txtLongitude.Text.Trim() == "" ? 0 : Convert.ToDouble(txtLongitude.Text.Trim());
c.Singleplace = txtSinglePlace.Text;
c.Storagetime = txtStorageTime.Text;
c.Baudrate = ddlBaudrate.SelectedValue;
c.Caremakind = ddlCameraKind.SelectedValue;
c.Carematype = ddlCameraType.SelectedValue;
c.Codeaddr = ddlCodeAddr.SelectedValue;
c.Codestream = ddlCodeStream.SelectedValue;
c.Controlprotocol = ddlControlProtocol.SelectedValue;
c.Customertype = ddlCustomerType.SelectedValue;
c.Devicelevel = ddlDeviceLevel.SelectedValue;
c.Devicemanu = ddlDeviceManu.SelectedValue;
c.Devicepropertyright = ddlDevicePropertyRight.SelectedValue;
c.Devicestate = ddlDeviceState.SelectedValue;
c.Dvsport = ddlDvsPort.SelectedValue;
c.Installmode = ddlInstallMode.SelectedValue;
c.Paymenttype = ddlPaymentType.SelectedValue;
c.Powertype = ddlPowerType.SelectedValue;
c.Powervoltage = ddlPowerVoltage.SelectedValue;
c.Storagetype = ddlStorageType.SelectedValue;
c.Switchinmode = ddlSwitchinMode.SelectedValue;
c.Switchinplace = ddlSwitchinPlace.SelectedValue;
c.Dvsid = hdfDvsID.Value;
c.Suburb = hdfSuburbID.Value;
if (hdfCameraID.Value == "0" || hdfCameraID.Value == "") //新增
{
CameraManager cm = new CameraManager();
cm.NewCamera(c, Session["userid"].ToString());
hdfCameraID.Value = c.Id.ToString();
btnModify.Text = "确定修改";
}
else
{
c.Id = DataGlobal.ConvertToInt(hdfCameraID.Value);
CameraManager cm = new CameraManager();
cm.ModifyCamera(c, Session["userid"].ToString());
}
}