コード例 #1
0
ファイル: SecurityClass.cs プロジェクト: bhavikgoyal/PingaWeb
        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);
            }
        }
コード例 #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");
            }
        }
コード例 #3
0
ファイル: Location.cs プロジェクト: bhavikgoyal/CKDemo
 //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);
     }
 }
コード例 #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");
            }
        }
コード例 #5
0
ファイル: Reporting.cs プロジェクト: bhavikgoyal/PingaWeb
 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);
     }
 }
コード例 #6
0
//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");
            }
        }
コード例 #7
0
ファイル: GeneralSettings.cs プロジェクト: bhavikgoyal/CKDemo
//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);
            }
        }