Пример #1
0
        private void ShowEdit()
        {
            var code = CodeInstance.Find(f => f.id == ParseInt(Utility.Decrypt(hidID.Value)));

            if (null != code)
            {
                txtCode.Value         = code.Code;
                txtName.Value         = code.Name;
                ddlType.SelectedValue = code.Status.ToString();
            }
            else
            {
                ShowNotification("./equipment_status_code.aspx", "Error: Cannot edit null object of <a>Equipment Situation Code</a>.", false);
            }
        }
Пример #2
0
        private void EditCode()
        {
            var code = CodeInstance.Find(f => f.id == ParseInt(Utility.Decrypt(hidID.Value)));

            if (null != code)
            {
                BuildCode(code);
                Update(code);

                // 保存历史记录
                SaveHistory(new TB_AccountHistory
                {
                    ActionId = ActionInstance.Find(f => f.Name.Equals("EditEquipmentStatusCode")).id,
                    ObjectA  = "[id=" + code.id + "] " + code.Name + ", " + code.Code
                });

                ShowNotification("./equipment_status_code.aspx", "You changed the equipment situation code.");
            }
            else
            {
                ShowNotification("./equipment_status_code.aspx", "Error: paramenter error, cannot edit null object(equipment situation code).", false);
            }
        }