예제 #1
0
        // this function for just referance for partial update field user have to create seperate function learn from this function.
        public bool UpdatePartial(ENT.MessageSendLog objEntity)
        {
            bool blnResult = false;

            try
            {
                //Create Fields List in dictionary
                Dictionary <string, bool> dctFields = new Dictionary <string, bool>();
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.MessageSendLog>(x => x.MessageLogId), true);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.MessageSendLog>(x => x.Mobile), false);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.MessageSendLog>(x => x.Response), false);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.MessageSendLog>(x => x.IsSent), false);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.MessageSendLog>(x => x.CreatedDateTime), false);
                objEntity.FieldCollection = dctFields;
                if (objDAL.SaveChanges(objEntity.FieldCollection, objEntity))
                {
                    blnResult = true;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(blnResult);
        }
예제 #2
0
        // this function for just referance for partial update field user have to create seperate function learn from this function.
        public bool UpdatePartial(ENT.PlantDeviceLastStatus objEntity)
        {
            bool blnResult = false;

            try
            {
                //Create Fields List in dictionary
                Dictionary <string, bool> dctFields = new Dictionary <string, bool>();
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.PlantDeviceLastStatus>(x => x.laststatus_id), true);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.PlantDeviceLastStatus>(x => x.laststatus_deviceid), false);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.PlantDeviceLastStatus>(x => x.laststatus_status), false);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.PlantDeviceLastStatus>(x => x.laststatus_type), false);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.PlantDeviceLastStatus>(x => x.CreatedDateTime), false);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.PlantDeviceLastStatus>(x => x.SystemDateTime), false);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.PlantDeviceLastStatus>(x => x.CreatedBy), false);
                objEntity.FieldCollection = dctFields;
                if (objDAL.SaveChanges(objEntity.FieldCollection, objEntity))
                {
                    blnResult = true;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(blnResult);
        }
예제 #3
0
        public bool UpdateStatus(Guid PrimarKey, COM.MyEnumration.MyStatus Status)
        {
            bool blnResult = false;

            try
            {
                //Create Fields List in dictionary
                Dictionary <string, bool> dctFields = new Dictionary <string, bool>();
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.AdminMasterSUB>(x => x.AdminID), true);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.AdminMasterSUB>(x => x.Status), false);
                Entity.AdminID = PrimarKey;
                Entity.Status  = Status;
                if (objDAL.SaveChanges(dctFields, Entity))
                {
                    blnResult = true;
                }
            }
            catch (Exception) { throw; }
            return(blnResult);
        }