Beispiel #1
0
        protected override void ShowData(int customTimeLogId)
        {
            base.ShowData(customTimeLogId);

            oDetailButtonPanel.SetId = SetId;

            Clear();

            var dataQuery = new CustomTimeLogDataModel();

            dataQuery.CustomTimeLogId = customTimeLogId;

            var entityList = CustomTimeLogDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile);

            if (entityList.Count == 1)
            {
                foreach (var entityItem in entityList)
                {
                    lblCustomTimeLogId.Text    = entityItem.CustomTimeLogId.ToString();
                    lblCustomTimeLogKey.Text   = entityItem.CustomTimeLogKey;
                    lblPersonId.Text           = entityItem.Person.ToString();
                    lblNoofFilesPromoted.Text  = entityItem.Value.ToString();
                    lblCustomTimeCategory.Text = entityItem.CustomTimeCategory;

                    oUpdateInfo.LoadText(entityItem.UpdatedDate, entityItem.UpdatedBy, entityItem.LastAction);

                    oHistoryList.Setup(PrimaryEntity, customTimeLogId, "CustomTimeLog");
                }
            }
        }
Beispiel #2
0
        public CustomTimeLogDataModel GetById(string value)
        {
            var dataQuery = new CustomTimeLogDataModel();

            dataQuery.CustomTimeLogId = int.Parse(value);
            var result = CustomTimeLogDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile, 1);

            return(result[0]);
        }
Beispiel #3
0
        public void LoadData(int customTimeLogId, bool showId)
        {
            // clear UI

            Clear();

            var dataQuery = new CustomTimeLogDataModel();

            dataQuery.CustomTimeLogId = customTimeLogId;

            var items = CustomTimeLogDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile);

            if (items.Count != 1)
            {
                return;
            }

            var item = items[0];

            CustomTimeLogId    = item.CustomTimeLogId;
            CustomTimeLogKey   = item.CustomTimeLogKey;
            PersonId           = item.PersonId;
            ApplicationId      = item.ApplicationId;
            CustomTimeCategory = item.CustomTimeCategory;
            WorkDate           = item.PromotedDate;
            NoofFilesPromoted  = item.Value;


            if (!showId)
            {
                txtCustomTimeLogId.Text = item.CustomTimeLogId.ToString();

                // only show Audit History in case of Update page, not for Clone.
                oHistoryList.Setup((int)SystemEntity.CustomTimeLog, customTimeLogId, "CustomTimeLog");
            }
            else
            {
                txtCustomTimeLogId.Text = String.Empty;
            }

            oUpdateInfo.LoadText(item.UpdatedDate, item.UpdatedBy, item.LastAction);
        }
Beispiel #4
0
        // GET api/summary/GetList
        public IEnumerable <CustomTimeLogDataModel> GetList(string value, string value1)
        {
            var settingCategory = value1;
            var searchString    = value;

            var dictionaryObject = JsonConvert.DeserializeObject <Dictionary <string, string> >(searchString);

            // save search filter parameters in user preference
            if (dictionaryObject != null)
            {
                foreach (var searchFilterColumnName in dictionaryObject.Keys)
                {
                    var searchFilterValue = dictionaryObject[searchFilterColumnName];
                    PerferenceUtility.UpdateUserPreference(settingCategory, searchFilterColumnName, dictionaryObject[searchFilterColumnName]);
                }
            }

            var dataQuery = JsonConvert.DeserializeObject <CustomTimeLogDataModel>(searchString);

            return(CustomTimeLogDataManager.GetEntityDetails(dataQuery, SessionVariables.RequestProfile));
        }