public SecurityClass Checkuserlogin(string UserName, string Password)
        {
            try
            {
                obj_con.clearParameter();
                obj_con.addParameter("@UserName", UserName);

                obj_con.addParameter("@Password", Password);
                DataTable dt = ConvertDataReaderToDataTable(obj_con.ExecuteReader("RE_Users_Login", CommandType.StoredProcedure));
                return(ConvertToOjbect(dt));
            }
            catch (Exception ex)
            {
                obj_con.RollbackTransaction();
                throw new Exception("RE_Users_Login : " + ex.Message);
            }
        }
Exemple #2
0
//delete data from database
        public void delete(Int32 Userid)
        {
            try
            {
                obj_con.clearParameter();
                obj_con.BeginTransaction();
                obj_con.addParameter("@Userid", Userid);
                obj_con.ExecuteNoneQuery("sp_users_delete", CommandType.StoredProcedure);
                obj_con.CommitTransaction();
            }
            catch (Exception ex)
            {
                obj_con.RollbackTransaction();
                throw new Exception("sp_users_delete");
            }
        }
Exemple #3
0
 //delete data from database
 public void delete(Int32?Locationid)
 {
     try
     {
         obj_con.clearParameter();
         obj_con.BeginTransaction();
         obj_con.addParameter("@Locationid", Locationid);
         obj_con.ExecuteNoneQuery("sp_Location_delete", CommandType.StoredProcedure);
         obj_con.CommitTransaction();
     }
     catch (Exception ex)
     {
         obj_con.RollbackTransaction();
         throw new Exception("sp_Location_delete:" + ex.Message);
     }
 }
Exemple #4
0
//delete data from database
        public void delete(Int32 Proposalchecklistid)
        {
            try
            {
                obj_con.clearParameter();
                obj_con.BeginTransaction();
                obj_con.addParameter("@Proposalchecklistid", Proposalchecklistid);
                obj_con.ExecuteNoneQuery("sp_proposalchecklistflatroof_delete", CommandType.StoredProcedure);
                obj_con.CommitTransaction();
            }
            catch (Exception ex)
            {
                obj_con.RollbackTransaction();
                throw new Exception("sp_proposalchecklistflatroof_delete");
            }
        }
Exemple #5
0
 public List <Dictionary <string, object> > GetBlockName(string ProjectID)
 {
     try
     {
         obj_con.clearParameter();
         obj_con.addParameter("@ProjectID", ProjectID);
         return(ConnectionCls.JsonUtils.ConvertDataTableToJsonString(ConvertDatareadertoDataTable(obj_con.ExecuteReader("Sp_mstBlock_GetBlockNamebyProjectID", CommandType.StoredProcedure))));
     }
     catch (Exception ex)
     {
         obj_con.RollbackTransaction();
         throw new Exception("Sp_mstBlock_GetBlockNamebyProjectID : " + ex.Message);
     }
 }
//delete data from database
        public void delete(Int32 Buildingdeficiencyrepairid)
        {
            try
            {
                obj_con.clearParameter();
                obj_con.BeginTransaction();
                obj_con.addParameter("@Buildingdeficiencyrepairid", Buildingdeficiencyrepairid);
                obj_con.ExecuteNoneQuery("sp_buildingdeficiencyrepair_delete", CommandType.StoredProcedure);
                obj_con.CommitTransaction();
            }
            catch (Exception ex)
            {
                obj_con.RollbackTransaction();
                throw new Exception("sp_buildingdeficiencyrepair_delete");
            }
        }
//delete data from database
        public void delete(Int32?Generalsettings)
        {
            try
            {
                obj_con.clearParameter();
                obj_con.BeginTransaction();
                obj_con.addParameter("@Generalsettings", Generalsettings);
                obj_con.ExecuteNoneQuery("sp_GeneralSettings_delete", CommandType.StoredProcedure);
                obj_con.CommitTransaction();
            }
            catch (Exception ex)
            {
                obj_con.RollbackTransaction();
                throw new Exception("sp_GeneralSettings_delete:" + ex.Message);
            }
        }