SQL Server implementation of the abstract DataProvider class This concreted data provider class provides the implementation of the abstract methods from data dataprovider.cs In most cases you will only modify the Public methods region below.
Inheritance: DataProvider
    protected void btnsave_Click(object sender, EventArgs e)
    {
        DataTable dtMealTemplate = new DataTable();
        SqlDataProvider db = new SqlDataProvider();
        dtMealTemplate.Columns.Add("Userid", Type.GetType("System.Int32"));
        dtMealTemplate.Columns.Add("Emailid", Type.GetType("System.String"));
        foreach (GridViewRow gvr in grdvwSite.Rows)
        {
            ///DataRow drMT = new DataRow();

            DataRow drMT = dtMealTemplate.NewRow();
            drMT["Userid"] = gvr.Cells[1].Text;
            drMT["Emailid"] = gvr.Cells[4].Text;

            dtMealTemplate.Rows.Add(drMT);
            CheckBox myCheckBox = (CheckBox)gvr.FindControl("CheckAll");
            if (myCheckBox.Checked == true)
            {
                UserEmail obj1 = new UserEmail();

                objuseremail.Userid = Convert.ToInt16(drMT["Userid"]);
                objuseremail.Emailid = drMT["Emailid"].ToString();
                objsentuseremail.SentFeedbackmailToUser(objuseremail.Userid, objuseremail.Emailid);
                objuseremail.InsertFeedbackCustomer();

            }
        }
    }
    public int InsertFeedbackCustomer()
    {
        SqlDataProvider db = new SqlDataProvider();

           // return db.Insert_UserToEmail_mst(this);
            return db.Insert_FeedbackCustomer_mst(this);
    }
        public ConnectionTreeModel LoadConnections(bool import)
        {
            IDeserializer deserializer;
            if (UseDatabase)
            {
                var connector = new SqlDatabaseConnector();
                var dataProvider = new SqlDataProvider(connector);
                var dataTable = dataProvider.Load();
                deserializer = new DataTableDeserializer(dataTable);
            }
            else
            {
                var dataProvider = new FileDataProvider(ConnectionFileName);
                var xmlString = dataProvider.Load();
                deserializer = new XmlConnectionsDeserializer(xmlString, PromptForPassword);
            }

            var connectionTreeModel = deserializer.Deserialize();

            if (connectionTreeModel != null)
                frmMain.Default.ConnectionsFileName = ConnectionFileName;
            else
                connectionTreeModel = new ConnectionTreeModel();

            if (import) return connectionTreeModel;
            PuttySessionsManager.Instance.AddSessions();
            connectionTreeModel.RootNodes.AddRange(PuttySessionsManager.Instance.RootPuttySessionsNodes);

            return connectionTreeModel;
        }
Beispiel #4
0
        public static IDataProvider GetRepository()
        {
            var ctl = ComponentFactory.GetComponent<IDataProvider>();

            if (ctl == null)
            {
                ctl = new SqlDataProvider();
                ComponentFactory.RegisterComponentInstance<IDataProvider>(ctl);
            }
            return ctl;
        }
Beispiel #5
0
 static DataProvider()
 {
     DataProvider dataProvider;
     if (FrameWork.Common.GetDBType == "MsSql")
         dataProvider = new SqlDataProvider();
     else if (FrameWork.Common.GetDBType == "Access")
         dataProvider = new AccessDataProvider();
     else
         throw new ApplicationException("数据库配置不对!");
     _defaultInstance = dataProvider;
 }
    public Site_mst Get_By_id(int Siteid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Site_mst_Get_By_Siteid(Siteid));
    }
    public int Delete(int siteid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Delete_Site_mst_By_id(siteid));
    }
 public int Insert()
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Insert_SLA_mst(this);
 }
 public int Delete(int CustId, int siteid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Delete_CustomerToSiteMapping_mst_By_id(CustId, siteid);
 }
 public int Update()
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Update_IncidentResolution_By_id(this);
 }
 public int Insert()
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Insert_IncidentResolution(this);
 }
Beispiel #12
0
    public BLLCollection <Problem_mst> Get_All_Problemid(int Problemid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_Problem_mst_All_By_Problemid(Problemid));
    }
Beispiel #13
0
    public Problem_mst Get_By_id(int problemid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Problem_mst_Get_By_problemid(problemid));
    }
Beispiel #14
0
    public BLLCollection <Problem_mst> Get_All()
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_Problem_All());
    }
Beispiel #15
0
    public int Get_Current_Problemid()
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Problem_mst_Get_Current_Problemid());
    }
Beispiel #16
0
    public int Delete(int Problemid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Delete_Problem_By_id(Problemid));
    }
    public int Get_TopSiteId()
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_TopSiteId_mst());
    }
    public BLLCollection <Site_mst> Get_All_By_RegionId(int regionid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_Site_mst_All_By_RegionId(regionid));
    }
 //public int Get_Current_ProblemHistoryid()
 //{
 //    SqlDataProvider db = new SqlDataProvider();
 //    return db.ProblemHistory_mst_Get_Current_ProblemHistoryid();
 //}
 public BLLCollection<ProblemNotes> Get_All_By_Problemid(int problemid)
 {
     SqlDataProvider db = new SqlDataProvider();
        //return db.Get_IncidentHistory_mst_All_By_incidentid(incidentid);
        return db.Get_ProblemNotes_mst_All_By_problemid(problemid);
 }
Beispiel #20
0
    public BLLCollection <Problem_mst> Get_All_By_Statusid(int statusid, string fromdate, string todate, int technicianid, string varSortParameter)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_Problem_mst_All_By_statusid(statusid, fromdate, todate, technicianid, varSortParameter));
    }
 public int Insert()
 {
     SqlDataProvider db = new SqlDataProvider();
        return db.Insert_ProblemSymptom_mst(this);
 }
Beispiel #22
0
    public BLLCollection <Problem_mst> Get_All_By_Assigned(string fromdate, string todate, string varSortParameter)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_Problem_mst_All_By_Assigned(fromdate, todate, varSortParameter));
    }
 public BLLCollection<IncidentResolution> Get_All_By_incidentid(int incidentid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Get_IncidentResolution_All_By_incidentid(incidentid);
 }
Beispiel #24
0
    public BLLCollection <Problem_mst> Get_All_Problemidid_By_SearchParameter(string Filterid, string keyword)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_Problem_mst_All_By_SearchParameter(Filterid, keyword));
    }
 public SLA_mst Get_By_id(int Slaid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.SLA_mst_Get_By_Slaid(Slaid);
 }
Beispiel #26
0
    public int Delete(int userid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Delete_ContactInfo_mst_By_id(userid));
    }
 public int Delete(int slaid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Delete_SLA_mst_By_id(slaid);
 }
    public int Get_By_SiteName(string SiteName, int regionid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_sitId_mst_Get_By_SiteName(SiteName, regionid));
    }
 public int Get_By_Id(int CustId, int siteid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Get_CustId_mst_Get_By_SiteId(CustId, siteid);
 }
 public BLLCollection<Department_mst> Get_All()
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Get_Department_mst_All();
 }
Beispiel #31
0
    public BLLCollection <Cab_mst> Get_All()
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_Cab_mst_All());
    }
 public int Get_By_DepartmentName(string departmentname, int siteid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Get_deptid_mst_Get_By_DepartmentName(departmentname, siteid);
 }
Beispiel #33
0
    public ContactInfo_mst Get_By_id(int userid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.ContactInfo_mst_Get_By_Userid(userid));
    }
    //change done by meenakshi

    public BLLCollection <Site_mst> Get_By_hubid_site(int hubid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.sp_Get_By_sitename_mst(hubid));
    }
 public int Delete(int deptid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Delete_Department_mst_By_id( deptid);
 }
Beispiel #36
0
    public BLLCollection <ContactInfo_mst> Get_All()
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_ContactInfo_All());
    }
 public BLLCollection<Department_mst> Get_All_By_SiteId(int siteid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Get_Department_mst_All_By_SieId(siteid);
 }
Beispiel #38
0
    //added by lalit---------------------------------
    public IDataReader Get_By_siteid()
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_contactInfo_ms_By_siteid());
    }
 public Department_mst Get_By_id(int deptid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Department_mst_Get_By_deptid(deptid);
 }
Beispiel #40
0
    public BLLCollection <ContactInfo_mst> Get_By_comandname(string commandname)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_ContactInfo_ms_By_commandname(commandname));
    }
 public ProblemSymptom Get_By_id(int problemid)
 {
     SqlDataProvider db = new SqlDataProvider();
        return db.ProblemSymptom_mst_Get_By_problemid(problemid);
 }
    public int Insert()
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Insert_SolutionCreator_mst(this));
    }
 public int Update()
 {
     SqlDataProvider db = new SqlDataProvider();
        return db.Update_ProblemSymptom_By_id(this);
 }
    public int Update()
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Update_SolutionCreator_mst_By_id(this));
    }
 public int Delete(int incidentid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Delete_IncidentResolution_By_id(incidentid);
 }
    public int Delete(int Solutionid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Delete_SolutionCreator_mst_By_id(Solutionid));
    }
 public IncidentResolution Get_By_id(int incidentid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.IncidentResolution_Get_By_incidentid(incidentid);
 }
    public SolutionCreator Get_By_id(int Solutionid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.SolutionCreator_mst_Get_By_Solutionid(Solutionid));
    }
 public BLLCollection<SLA_mst> Get_All_By_Siteid(int siteid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Get_SLA_mst_All_By_Siteid(siteid);
 }
Beispiel #50
0
    public Cab_mst Get_By_id(int cabid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Cab_mst_Get_By_cabid(cabid));
    }
 public SLA_mst Get_By_SLAName(string Slaname, int siteid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Get_SLA_mst_Get_By_SLAName(Slaname, siteid);
 }
Beispiel #52
0
    public Cab_mst Get_Cab_By_membername(string membername)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_Cab_By_membername(membername));
    }
 public int Update()
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Update_SLA_mst_By_id(this);
 }
Beispiel #54
0
    public BLLCollection <Cab_mst> Get_All_By_ChangeTypeid(int Changetypeid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Get_CabMember_mst_All_By_ChangeTypeid(Changetypeid));
    }
 public BLLCollection<SLA_mst> Get_All()
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Get_SLA_mst_All();
 }
Beispiel #56
0
    public int Insert()
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Insert_Cab_mst(this));
    }
 public BLLCollection<CustomerToSiteMapping> Get_All_By_siteid(int siteid)
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Get_CustomerToSiteMapping_mst_All_By_siteid(siteid);
 }
Beispiel #58
0
    public int Update()
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Update_Cab_mst_By_id(this));
    }
 public int Insert()
 {
     SqlDataProvider db = new SqlDataProvider();
     return db.Insert_CustomerToSiteMapping_mst(this);
 }
Beispiel #60
0
    public int Delete(int cabid)
    {
        SqlDataProvider db = new SqlDataProvider();

        return(db.Delete_Cab_mst_By_id(cabid));
    }