Beispiel #1
0
 public HttpResponseMessage AddCompany(Pharma_Company_Details CompanyDetails)
 {
     try
     {
         objBal.AddCompany(CompanyDetails);
         return(Request.CreateResponse(HttpStatusCode.Created, CompanyDetails));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message));
     }
 }
Beispiel #2
0
        //3.6)This method is used to add Company
        public bool AddCompany(Pharma_Company_Details CompanyDetails)
        {
            bool flag = false;
            int  i    = 0;

            using (MSMSDBEntities db = new MSMSDBEntities())
            {
                db.Pharma_Company_Details.Add(CompanyDetails);
                i += db.SaveChanges();
                if (i > 0)
                {
                    return(true);
                }
            }
            return(flag);
        }
Beispiel #3
0
 //3.6)This method is used to add Company
 public void AddCompany(Pharma_Company_Details CompanyDetails)
 {
     IObjRep.AddCompany(CompanyDetails);
 }