private void GetValueFromControl(HRM_PolicyFileAttach f) { f.PolicyAttachKey = hfPolicyFileKey.Value.ToInt(); f.OrgKey = ddlCompany.SelectedValue.ToInt(); f.FileName = txtFileName.Text; f.AttachDate = txtDate.Text.ToDateTime(ASL.STATIC.StaticInfo.GridDateFormat); f.AttachDesc = txtDescription.Text; f.FilePath = GetEmpFile(); }
protected void btnAdd_Click(object sender, EventArgs e) { var eh = new HRM_PolicyFileAttach(); GetValueFromControl(eh); if (!string.IsNullOrEmpty(eh.FileName) && !string.IsNullOrEmpty(eh.FilePath)) { EmpFileList.Add(eh); } else { ((PageBase)(this.Page)).ErrorMessage = "File name and File path are required"; } Page page = null; page = ((Page)this.Page); if (page != null) { page.ClientScript.RegisterClientScriptBlock(GetType(), "selectedtab", "selectedtab=5", true); } }
public CustomList <HRM_PolicyFileAttach> GetAllHRM_PolicyFileAttach() { return(HRM_PolicyFileAttach.GetAllHRM_PolicyFileAttach()); }