Exemplo n.º 1
0
 public void Add(CRM_Target target)
 {
     if (target != null)
     {
         _dbContext.CRM_Target.Add(target);
     }
 }
Exemplo n.º 2
0
 private void frmCreateTarget_Load(object sender, EventArgs e)
 {
     if (this.Text == "修改销售目标")
     {
         frmTarget ft;
         ft = (frmTarget)this.Owner;
         ct = ft.GetCRM_TargetModel();
         LoadUpdateTarget();
     }
 }
Exemplo n.º 3
0
        public int Update(CRM_Target target)
        {
            cts.Update(target);
            int result = cts.SaveChanges();

            if (result > 0)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
Exemplo n.º 4
0
        public void Update(CRM_Target target)
        {
            var updatetarget = _dbContext.CRM_Target.Find(target.Id);

            if (updatetarget != null)
            {
                updatetarget.MId      = target.MId;
                updatetarget.MDate    = target.MDate;
                updatetarget.Period   = target.Period;
                updatetarget.Target1  = target.Target1;
                updatetarget.Target2  = target.Target2;
                updatetarget.Target3  = target.Target3;
                updatetarget.Target4  = target.Target4;
                updatetarget.UserName = target.UserName;
            }
        }