protected void gridFault_DataBinding(object sender, EventArgs e)
        {
            ASPxGridView faultGridView = (ASPxGridView)sender;
            var          faults        = FaultRepository.GetReleaseFaultRecord();

            faultGridView.DataSource = faults;

            (faultGridView.Columns["FaultStatus"] as GridViewDataComboBoxColumn).PropertiesComboBox.DataSource = Enum.GetValues(typeof(EFaultStatus));
        }
        protected void gridFault_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
        {
            var model = new FaultRecord();

            model.FaultRecordId = (int)e.Keys[0];
            model.FaultStatus   = e.NewValues["FaultStatus"].ToString() == EFaultStatus.Open.ToString() ?
                                  (int)EFaultStatus.Open : (int)EFaultStatus.Close;
            model.Remarks = (string)e.NewValues["Remarks"];

            FaultRepository.UpdateFaultRecord(model);

            ASPxGridView senderGridView = (ASPxGridView)sender;

            e.Cancel = true;
            senderGridView.CancelEdit();
            senderGridView.DataSource = FaultRepository.GetReleaseFaultRecord();
        }
        // List<DocumentAttachment> AttachFileModelList = new List<DocumentAttachment>();

        protected void Page_Load(object sender, EventArgs e)
        {
            UploadAttachment.ValidationSettings.MaxFileSize           = AppConfiguration.UPLOAD_MAXFILESIZE_BYTES;
            UploadAttachment.ValidationSettings.MaxFileSizeErrorText  = "File size must be <= " + AppConfiguration.UPLOAD_MAXFILESIZE_BYTES.BytesToString();
            UploadAttachment.ValidationSettings.AllowedFileExtensions = AppConfiguration.UPLOAD_FILE_EXTENSIONS.Split(",");

            if (!IsPostBack)
            {
                var faults = FaultRepository.GetReleaseFaultRecord();
                gridFault.DataSource = faults;
                gridFault.DataBind();
                //if (Session["dtAttachment"] != null)
                //{
                //    GVDataAttachment.DataSource = Session["dtAttachment"];
                //    GVDataAttachment.DataBind();
                //}
            }
            PopUpAttachMent.ShowOnPageLoad = false;
        }