コード例 #1
0
        public string UpdateTempCard(TempCardViewModel tmp, int id)
        {
            var tmpmodel = new TempCardModel()
            {
                tempno     = id,
                empid      = tmp.empid,
                tempcardno = tmp.tempcardno,
                IsDeleted  = tmp.IsDeleted,
                IsActive   = tmp.IsActive,
                // addedby = "pooja",
                // addedon = DateTime.Now,
                modifiedby = tmp.modifiedby,
                modifiedon = DateTime.Now
            };
            int k = dataobj.UpdateTempCard(tmpmodel, tmpmodel.tempno);

            if (k == 1)
            {
                return("record added");
            }
            else
            {
                return("record not added");
            }
        }
コード例 #2
0
        public string AddCard(TempCardViewModel tmp)
        {
            var tmpmodel = new TempCardModel()
            {
                empid      = tmp.empid,
                tempcardno = tmp.tempcardno,
                IsDeleted  = tmp.IsDeleted,
                IsActive   = tmp.IsActive,
                addedby    = "pooja",
                addedon    = DateTime.Now,
                modifiedby = "pooja",
                modifiedon = DateTime.Now
            };
            int k = dataobj.AddCardEntry(tmpmodel);

            if (k == 1)
            {
                return("record added");
            }
            else
            {
                return("record not added");
            }
        }