コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (IsPostBack.IsFalse())
         {
             InitializeCombo();
             InitializeSession();
         }
         else
         {
             Page.ClientScript.GetPostBackEventReference(this, String.Empty);
             String eventTarget = Request["__EVENTTARGET"].IsNullOrEmpty() ? String.Empty : Request["__EVENTTARGET"];
             if (Request["__EVENTTARGET"] == "SearchCmnDocListFormat")
             {
                 DocListFormatList = new CustomList <CmnDocListFormat>();
                 CmnDocListFormat searchCmnDocListFormat = Session[STATIC.StaticInfo.SearchSessionVarName] as CmnDocListFormat;
                 DocListFormatList.Add(searchCmnDocListFormat);
                 if (searchCmnDocListFormat.IsNotNull())
                 {
                     PopulateDocListFormatInformation(searchCmnDocListFormat);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                CustomList <CmnDocListFormat> lstCmnDocListFormat = (CustomList <CmnDocListFormat>)DocListFormatList;
                if (lstCmnDocListFormat.Count == 0)
                {
                    CmnDocListFormat newObj = new CmnDocListFormat();
                    lstCmnDocListFormat.Add(newObj);
                }
                SetDataFromControlToObject(ref lstCmnDocListFormat);
                CustomList <CmnDocListFormatDetail> lstCmnDocListFormatDetail = DocListFormatDetailList;
                if (!CheckUserAuthentication(lstCmnDocListFormat))
                {
                    return;
                }
                _manager.SaveDocListFormat(ref lstCmnDocListFormat, ref lstCmnDocListFormatDetail);
                this.SuccessMessage = (StaticInfo.SavedSuccessfullyMsg);
            }

            catch (SqlException ex)
            {
                this.ErrorMessage = (ExceptionHelper.getSqlExceptionMessage(ex));
            }
            catch (Exception ex)
            {
                this.ErrorMessage = (ExceptionHelper.getExceptionMessage(ex));
            }
        }
コード例 #3
0
        private void SetDataFromControlToObject(ref CustomList <CmnDocListFormat> lstDocListFormat)
        {
            CmnDocListFormat obj = lstDocListFormat[0];

            if (ddlMenuName.SelectedValue != "")
            {
                obj.DocListId = ddlMenuName.SelectedValue.ToInt();
            }
            obj.CustomCode = txtCustomCode.Text;
            obj.Prefix     = txtPrefix.Text;
            obj.Suffix     = txtSufix.Text;
            obj.PeriodType = ddlPeriodType.SelectedValue;
        }
コード例 #4
0
 private void PopulateDocListFormatInformation(CmnDocListFormat cmnDocListFormat)
 {
     try
     {
         txtCustomCode.Text        = cmnDocListFormat.CustomCode;
         txtPrefix.Text            = cmnDocListFormat.Prefix;
         txtSufix.Text             = cmnDocListFormat.Suffix;
         ddlMenuName.SelectedValue = cmnDocListFormat.DocListId.ToString();
         DocListFormatDetailList   = _manager.GetAllDocListFormat_Detail(cmnDocListFormat.DocListFormatID);
     }
     catch (Exception ex)
     {
         throw (ex);
     }
 }
コード例 #5
0
 //public CustomList<SegmentNames> GetAllSegmentNames()
 //{
 //    return SegmentNames.GetAllSegmentNames();
 //}
 //public CustomList<SegmentNames> GetGroupSegmentNames(String itemGroupID)
 //{
 //    return SegmentNames.GetGroupSegmentNames(itemGroupID);
 //}
 //public CustomList<SegmentValues> GetAllSegmentValues(Int32 segmentNameID)
 //{
 //    return SegmentValues.GetAllSegmentValues(segmentNameID);
 //}
 public CustomList <CmnDocListFormat> GetAllDocListFormatFind()
 {
     return(CmnDocListFormat.GetAllDocListFormatFind());
 }