示例#1
0
        private void setInputEnable(bool isEnable)
        {
            isEditable = isEnable;
            RadWebControl[] UnEditableControls = { tbDetailID, tbProjectID, dateCreate, tbRepairmanID };
            foreach (RadWebControl ctrl in UnEditableControls)
            {
                ctrl.Enabled = false;
            }
            RadWebControl[] InputControls = { tbFaultDetail, tbAddRequirement, RadAsyncUpload1 };
            RadComboBox[]   InputCombobox = { cmbFaultStatus, cmbFaultType, cmbSeverity };
            foreach (RadWebControl ctrl in InputControls)
            {
                ctrl.Enabled = isEnable;
            }
            foreach (RadComboBox cmb in InputCombobox)
            {
                cmb.Enabled = isEnable;
            }

            btnEdit.Enabled      = !isEnable;
            viewProject.Enabled  = !isEnable;
            div_editBtns.Visible = isEnable;

            GridPhoto.Rebind();
        }
示例#2
0
        private void getRepairInfoByID(int detailID)
        {
            projectDetailTable entity = detailBLL.getDetailInfoByID(detailID);

            if (entity != null)
            {
                tbProjectID.Text             = entity.projectID.ToString();
                viewProject.NavigateUrl      = Global.projectURL + "?projID=" + entity.projectID.ToString();
                tbRepairmanID.Text           = rmBLL.getRMinfoById(entity.repairmanID.Value).repairmanName;
                dateCreate.SelectedDate      = entity.createDate.Value;
                cmbFaultStatus.SelectedValue = entity.faultStatus.ToString();
                cmbFaultType.SelectedValue   = entity.faultType.ToString();
                cmbSeverity.SelectedValue    = entity.severity.ToString();
                tbFaultDetail.Text           = entity.faultDetail;
                tbAddRequirement.Text        = entity.add_requirement;
                if (entity.photos != null)
                {
                    ViewState["PhotoList"] = entity.photos; GridPhoto.Rebind();
                }
            }
        }