• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DataAccess类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DataAccess的典型用法代码示例。如果您正苦于以下问题:C# DataAccess类的具体用法?C# DataAccess怎么用?C# DataAccess使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DataAccess类属于命名空间,在下文中一共展示了DataAccess类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write("{\"employees\": [");
        string connectionstring =
            System.Configuration.ConfigurationManager.ConnectionStrings["HuberGoDaddy"].ConnectionString;
        DataAccess da = new DataAccess();
        System.Data.DataSet ds = da.getDataSet(connectionstring,
            "select employeeid, firstname, lastname from huber_employees");

        //if there are no employees returned
        if (ds.Tables.Count <= 0 || ds.Tables[0].Rows.Count <= 0)
        {
            Response.Write("{}");
        }
        else
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                Response.Write("{\"employeeid\": \"" +
                    ds.Tables[0].Rows[i].ItemArray[0].ToString() +
                    "\",\"firstname\":" +
                    "\"" + ds.Tables[0].Rows[i].ItemArray[1].ToString() + "\"}");

                if (i<ds.Tables[0].Rows.Count-1)
                {
                    Response.Write(",");
                }

            }
        }

        Response.Write("]}");
    }
开发者ID:jasonhuber,项目名称:WEB460_May_2013,代码行数:33,代码来源:getemployees.aspx.cs


示例2: Assignment_SelectAddSelectDeleteSelect_OK

        public void Assignment_SelectAddSelectDeleteSelect_OK()
        {
            using (System.Transactions.TransactionScope updateTransaction =
             new System.Transactions.TransactionScope())
            {
                string connectionString = GetConnectionstring();
                DataAccess d2 = new DataAccess(connectionString);

                List<Assignment> assignmentsBefore = d2.GetAssignments();

                Assignment assignment = new Assignment();
                assignment.AssignmentId = -1;
                assignment.AssignmentName = "asfdasfasdfsaf";

                Assignment assignmentAfterSave = d2.SaveAssignment(assignment);

                Assignment assignmentGetById = d2.GetAssignmentByID(assignment.AssignmentId);

                Assert.AreNotEqual(assignment.AssignmentId, -1);
                Assert.AreEqual(assignment.AssignmentName, assignmentGetById.AssignmentName);

                List<Assignment> assignmentsAfterSave = d2.GetAssignments();

                Assert.AreEqual(assignmentsAfterSave.Count, assignmentsBefore.Count + 1);

                d2.DeleteAssignment(assignment.AssignmentId);

                List<Assignment> assignmentsAfterDelete = d2.GetAssignments();

                Assert.AreEqual(assignmentsBefore.Count, assignmentsAfterDelete.Count);

            }
        }
开发者ID:ruudkok,项目名称:MoCS,代码行数:33,代码来源:DataAccessTests.cs


示例3: LoadPostedJob

    public void LoadPostedJob()
    {
        DataAccess dataaccess = new DataAccess();

        using (SqlConnection Sqlcon = dataaccess.OpenConnection())
        {
            using (SqlCommand cmd = new SqlCommand())
            {

                cmd.Connection = Sqlcon;
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "getPostJob";
                cmd.Parameters.Add(new SqlParameter("@Action", SqlDbType.VarChar, 50));
                cmd.Parameters.Add(new SqlParameter("@CompanyId", SqlDbType.Int));

                cmd.Parameters["@CompanyId"].Value = int.Parse(CompanyId);

                cmd.Parameters["@Action"].Value = "select";
                cmd.Parameters.Add("@Exists", SqlDbType.Int).Direction = ParameterDirection.Output;
                SqlAda = new SqlDataAdapter(cmd);
                ds = new DataSet();
                SqlAda.Fill(ds);
                GrdLoadJobCompany.DataSource = ds;
                GrdLoadJobCompany.DataBind();
            }
        }
    }
开发者ID:riteshdamedhar,项目名称:DevgiriRepo,代码行数:27,代码来源:Applied.aspx.cs


示例4: btnEmployee_Click

    protected void btnEmployee_Click(object sender, EventArgs e)
    {
        Response.Write("{\"employees\": [");
        string connectionstring = System.Configuration.ConfigurationManager.ConnectionStrings["OrtegaGoDaddy"].ConnectionString;
        DataAccess da = new DataAccess();

        System.Data.DataSet ds = da.getDataSet(connectionstring, "select employeeId, employeeFname, employeeLname from Ortega_Employees");

        if (ds.Tables.Count <= 0 || ds.Tables[0].Rows.Count <= 0)
        {
            Response.Write("{}");
        }
        else
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                Response.Write("{\"employeeid\": \"" +
                    ds.Tables[0].Rows[i].ItemArray[0].ToString() + "\",\"firstname\":" + "\"" + ds.Tables[0].Rows[i].ItemArray[1].ToString() + "\"}");

                if (i < ds.Tables[0].Rows.Count - 1)
                {
                    Response.Write(",");
                }

            }
        }

        Response.Write("]}");
    }
开发者ID:paulortega,项目名称:WEB460_MobileJSON,代码行数:29,代码来源:getEmployees.aspx.cs


示例5: LoadRejectedCompany

    public void LoadRejectedCompany()
    {
        DataAccess dataaccess = new DataAccess();

        using (SqlConnection Sqlcon = dataaccess.OpenConnection())
        {
            using (SqlCommand cmd = new SqlCommand())
            {

                cmd.Connection = Sqlcon;
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "getCompany";
                cmd.Parameters.Add(new SqlParameter("@Action", SqlDbType.VarChar, 50));
                cmd.Parameters.Add(new SqlParameter("@Active", SqlDbType.Int));

                cmd.Parameters["@Active"].Value = 2;

                cmd.Parameters["@Action"].Value = "select";
                cmd.Parameters.Add("@Exists", SqlDbType.Int).Direction = ParameterDirection.Output;
                SqlAda = new SqlDataAdapter(cmd);
                ds = new DataSet();
                SqlAda.Fill(ds);

                grdRejected.DataSource = ds;
                grdRejected.DataBind();

            }
        }
    }
开发者ID:riteshdamedhar,项目名称:DevgiriRepo,代码行数:29,代码来源:Company.aspx.cs


示例6: AddPerson

        public DataAccess.DataContracts.IPerson AddPerson(DataAccess.DataContracts.IPerson person)
        {
            _people.Add(person);
            person.PersonId = _people.Count();

            return person;
        }
开发者ID:SolutiaCA,项目名称:TrainingProject,代码行数:7,代码来源:MockPersonRepository.cs


示例7: CopyAndUpdateFields

        public int CopyAndUpdateFields(int SourceID, int? NguoiDungID, int? DauGiaID, decimal? TraGia,
            DateTime? ThoiGianTraGia, string Bak1, string Bak2, int? Bak3, bool? Bak4)
        {
            DataAccess objDataAccess = new DataAccess();
            using (SqlCommand sqlCmd = new SqlCommand())
            {
                int iID = 0;
                sqlCmd.CommandType = CommandType.StoredProcedure;
                sqlCmd.CommandText = "CopyAndUpdateFieldsTraGia";

                sqlCmd.Parameters.Add("@SourceID", SqlDbType.Int).Value = SourceID;
                sqlCmd.Parameters.Add("@NguoiDungID", SqlDbType.Int).Value = NguoiDungID;

                sqlCmd.Parameters.Add("@DauGiaID", SqlDbType.Int).Value = DauGiaID;

                sqlCmd.Parameters.Add("@TraGia", SqlDbType.Money).Value = TraGia;

                sqlCmd.Parameters.Add("@ThoiGianTraGia", SqlDbType.DateTime).Value = ThoiGianTraGia;

                sqlCmd.Parameters.Add("@Bak1", SqlDbType.NVarChar, 50).Value = Bak1;

                sqlCmd.Parameters.Add("@Bak2", SqlDbType.NVarChar, 50).Value = Bak2;

                sqlCmd.Parameters.Add("@Bak3", SqlDbType.Int).Value = Bak3;

                sqlCmd.Parameters.Add("@Bak4", SqlDbType.Bit).Value = Bak4;

                iID = objDataAccess.ExecuteScalar(sqlCmd);
                return iID;
            }
        }
开发者ID:dsbissett,项目名称:chonet,代码行数:31,代码来源:Base_TraGia.cs


示例8: btn_Save_Click1

 protected void btn_Save_Click1(object sender, EventArgs e)
 {
     DataAccess da = new DataAccess();
     String res = da.updateAccountabilityInfo(Convert.ToInt32(hf_Accountability_Id.Value),
                                             Convert.ToInt32(ddl_Acct_Next_Level.SelectedValue),
                                             txt_Note.Text);
 }
开发者ID:sdemdouglas,项目名称:sdecateproject,代码行数:7,代码来源:AccountabilityReport_V2.aspx.cs


示例9: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            DataAccess data = new DataAccess();
            ddChuyenMuc.DataSource = data.GetAllChuyenMuc();
            ddChuyenMuc.DataValueField = "id";
            ddChuyenMuc.DataTextField = "tenCM";
            ddChuyenMuc.DataBind();
            BaiViet bv = new BaiViet();
            bv = data.GetABaiViet(Convert.ToInt32(Request.QueryString["id"]));
            txtTieuDe.Text = bv.tieuDe.ToString();
            ddChuyenMuc.Text = bv.id_cm.ToString();
            oldHinhAnh.ImageUrl = bv.hinhAnh.ToString();
            txtNoiDung.Text = bv.noiDung;
            txtMota.Text = bv.moTa;
            txtTuKhoa.Text = bv.tuKhoa;
            if (bv.trangThai == 1) rd1.Checked = true;
            else rd0.Checked = true;

            //if (rdv.Equals(1)
            //{
            //    rdtrangThai.Items.FindByValue("1").Selected = true;
            //    rdtrangThai.Items.FindByValue("0").Selected = false;
            //}
            //else
            //{
            //    rdtrangThai.Items.FindByValue("0").Selected = true;
            //    rdtrangThai.Items.FindByValue("1").Selected = false;
            //}

        }
    }
开发者ID:sukiu93,项目名称:asp,代码行数:33,代码来源:SuaTin.aspx.cs


示例10: CalculateQRests

        public static string CalculateQRests(int SpareID)
        {
            SpareView spare = SpareContainer.Instance.GetSpare(SpareID);
            DataAccess da = new DataAccess();
            string xml = "";
            List<warehouse> warehouses = da.GetWarehouses();
            List<double> Qs = new List<double>();
            xml += "<r>";

            // Q total
            double q0 = spare.QRest.HasValue ? spare.QRest.Value : 0;
            Qs.Add(q0);

            // all actual incomes
            List<SpareInSpareIncomeView> incomes = da.GetActualIncomes();

            // Q by warehouses
            foreach (warehouse w in warehouses)
            {
                // incomes by warehouse
                decimal? q = incomes.Where(i => (i.WarehouseID == w.id && i.SpareID == SpareID)).Sum(i => i.QRest);
                if (q.HasValue)
                    Qs.Add((double)q.Value);
                else
                    Qs.Add(0);
            }

            foreach (double q in Qs)
                xml += "<w q=\"" + q.ToString() + "\"/>";
            xml += @"</r>";

            // save sml to db
            da.SpareEdit(SpareID, xml);
            return xml;
        }
开发者ID:bashlykevich,项目名称:Bycar,代码行数:35,代码来源:Helper.cs


示例11: CopyAndUpdateFields

        public int CopyAndUpdateFields(int SourceID, int? NguoiDungID, string HovaTenNguoiNhan, string DiaChiNguoiNhan,
            string EmailNguoiNhan, string DTDDNguoiNhan, string CMTND)
        {
            DataAccess objDataAccess = new DataAccess();
            using (SqlCommand sqlCmd = new SqlCommand())
            {
                int iID = 0;
                sqlCmd.CommandType = CommandType.StoredProcedure;
                sqlCmd.CommandText = "CopyAndUpdateFieldsDonHang";

                sqlCmd.Parameters.Add("@SourceID", SqlDbType.Int).Value = SourceID;
                sqlCmd.Parameters.Add("@NguoiDungID", SqlDbType.Int).Value = NguoiDungID;

                sqlCmd.Parameters.Add("@HovaTenNguoiNhan", SqlDbType.NVarChar, 50).Value = HovaTenNguoiNhan;

                sqlCmd.Parameters.Add("@DiaChiNguoiNhan", SqlDbType.NVarChar, 1000).Value = DiaChiNguoiNhan;

                sqlCmd.Parameters.Add("@EmailNguoiNhan", SqlDbType.NVarChar, 50).Value = EmailNguoiNhan;

                sqlCmd.Parameters.Add("@DTDDNguoiNhan", SqlDbType.NVarChar, 50).Value = DTDDNguoiNhan;

                sqlCmd.Parameters.Add("@CMTND", SqlDbType.VarChar, 9).Value = CMTND;

                iID = objDataAccess.ExecuteScalar(sqlCmd);
                return iID;
            }
        }
开发者ID:dsbissett,项目名称:chonet,代码行数:27,代码来源:Base_DonHang.cs


示例12: BaseClass

        /// <summary>
        /// Constructor (Solo para uso Externo) de la Clase BaseClass.
        /// </summary>
        /// <param name="bizSrv"></param>
        /// <param name="callingAssembly"></param>
        /// <param name="creteDBConnection"></param>
        protected BaseClass(BizServer bizSrv, string callingAssembly, bool createDBConnection)
        {
            if (callingAssembly == Assembly.GetExecutingAssembly().GetName().Name)
                throw new Exception("This constructor must be used only from external assembly.");

            try
            {
                if (bizSrv == null)
                    throw new ArgumentNullException("BizServer");

                _oBizServer = bizSrv;

                if (createDBConnection)
                {
                    _oDataAccess = EstudioDelFutbol.Data.ADONETDataAccess.DataAccess.GetSqlClientWrapper(bizSrv.DataBase.ConnectionString, new CacheHelper(), bizSrv.Log);

                    if (bizSrv.Usuario != null)
                        _oDataAccess.TrackingInfo = bizSrv.Usuario.RemoteEndpoint;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:mattrafa206,项目名称:EstudioDelFutbol,代码行数:31,代码来源:BaseClass.cs


示例13: CopyAndUpdateFields

        public int CopyAndUpdateFields(int SourceID, string LoaiNguoiDung, int? SapXep, string Bak1, string Bak2,
            int? Bak3)
        {
            DataAccess objDataAccess = new DataAccess();
            using (SqlCommand sqlCmd = new SqlCommand())
            {
                int iID = 0;
                sqlCmd.CommandType = CommandType.StoredProcedure;
                sqlCmd.CommandText = "CopyAndUpdateFieldsLoaiNguoiDung";

                sqlCmd.Parameters.Add("@SourceID", SqlDbType.Int).Value = SourceID;
                sqlCmd.Parameters.Add("@LoaiNguoiDung", SqlDbType.NVarChar, 50).Value = LoaiNguoiDung;

                sqlCmd.Parameters.Add("@SapXep", SqlDbType.Int).Value = SapXep;

                sqlCmd.Parameters.Add("@Bak1", SqlDbType.NVarChar, 50).Value = Bak1;

                sqlCmd.Parameters.Add("@Bak2", SqlDbType.NVarChar, 50).Value = Bak2;

                sqlCmd.Parameters.Add("@Bak3", SqlDbType.Int).Value = Bak3;

                iID = objDataAccess.ExecuteScalar(sqlCmd);
                return iID;
            }
        }
开发者ID:dsbissett,项目名称:chonet,代码行数:25,代码来源:Base_LoaiNguoiDung.cs


示例14: CopyAndUpdateFields

        public int CopyAndUpdateFields(int SourceID, string TenKhuVuc, string GhiChu, int? SapXep, bool? HienThi,
            string Bak1, string Bak2, int? Bak3)
        {
            DataAccess objDataAccess = new DataAccess();
            using (SqlCommand sqlCmd = new SqlCommand())
            {
                int iID = 0;
                sqlCmd.CommandType = CommandType.StoredProcedure;
                sqlCmd.CommandText = "CopyAndUpdateFieldsKhuVuc";

                sqlCmd.Parameters.Add("@SourceID", SqlDbType.Int).Value = SourceID;
                sqlCmd.Parameters.Add("@TenKhuVuc", SqlDbType.NVarChar, 50).Value = TenKhuVuc;

                sqlCmd.Parameters.Add("@GhiChu", SqlDbType.NVarChar, 1000).Value = GhiChu;

                sqlCmd.Parameters.Add("@SapXep", SqlDbType.Int).Value = SapXep;

                sqlCmd.Parameters.Add("@HienThi", SqlDbType.Bit).Value = HienThi;

                sqlCmd.Parameters.Add("@Bak1", SqlDbType.NVarChar, 50).Value = Bak1;

                sqlCmd.Parameters.Add("@Bak2", SqlDbType.NVarChar, 50).Value = Bak2;

                sqlCmd.Parameters.Add("@Bak3", SqlDbType.Int).Value = Bak3;

                iID = objDataAccess.ExecuteScalar(sqlCmd);
                return iID;
            }
        }
开发者ID:dsbissett,项目名称:chonet,代码行数:29,代码来源:Base_KhuVuc.cs


示例15: GetPassthroughAction

        /// <summary>
        /// Method that get the correct passthrough action based on the given request. 
        /// </summary>
        /// <param name="resourceExtension">The resource extention that was requested (ie. "/jobs").</param>
        /// <param name="request">The actual http request.</param>
        /// <param name="container">The container that action should be preformed on.</param>
        /// <param name="subscriptionId">The subscription Id that made the request.</param>
        /// <returns></returns>
        public IPassthroughAction GetPassthroughAction(string resourceExtension, HttpRequestMessage request, 
                                                       DataAccess.Context.ClusterContainer container, string subscriptionId)
        {
            Contract.AssertArgNotNull(request,"request");
            Contract.AssertArgNotNull(request.RequestUri,"request.RequestUri");

            switch (resourceExtension.ToLowerInvariant())
            {
                case "jobs":
                    switch (request.Method.ToString().ToLowerInvariant())
                    {
                        case "put":
                            var requestPayload = GetRequestPayload(request);
                            
                            var jobRequest = jobRequestFactory.CreateJobRequest(requestPayload);
                            if (jobRequest == null)
                            {
                                throw new PassthroughActionProcessingException(string.Format(JobSubmissionConstants.InvalidJobRequestLogMessage, requestPayload));
                            }
                            return CreateJobRequestAction(jobRequest, container, subscriptionId);
                        case "get":
                            return CreateJobHistoryAction(request.RequestUri, container, subscriptionId);
                    }
                    break;
            }
            throw new PassthroughActionProcessingException(string.Format(JobSubmissionConstants.PassThroughActionCreationFailedLogMessage, resourceExtension,request.Method));
        }
开发者ID:RossMerr,项目名称:azure-sdk-for-net,代码行数:35,代码来源:PassthroughActionFactory.cs


示例16: LoadJobDetails

    public void LoadJobDetails()
    {
        DataAccess dataaccess = new DataAccess();
        SqlConnection Sqlcon = dataaccess.OpenConnection();

        String SQLQuery = "SELECT p.PostJobId, p.JobTitle,p.JobDesc,p.QulificationId,p.SpecificationId,p.ExpInYear,p.ExpInMonth,p.JobTypeId,p.CompanyId,p.Active,p.Location,C.CompanyName,C.CompanyLogo,Q.QualificationName from PostJobMaster as p inner join CompanyMaster as C on C.CompanyId = p.CompanyId inner join QualificationMaster as Q on Q.QualificationId=p.QulificationId where p.CompanyId =" + PostJobId + "";

        SqlCommand command = new SqlCommand(SQLQuery, Sqlcon);
        SqlDataReader Dr;

        Dr = command.ExecuteReader();

        while (Dr.Read())
        {

            lblJobTitle.Text = Dr["JobTitle"].ToString();
            lblCompName.Text = Dr["CompanyName"].ToString();
            imgCompLogo.ImageUrl = "~/CompanyLogo/" + Dr["CompanyLogo"].ToString();
            lblQuil.Text = Dr["QualificationName"].ToString();
            lblExpYear.Text = Dr["ExpInYear"].ToString();
            lblExpMonths.Text = Dr["ExpInMonth"].ToString();
            lblLocation.Text = Dr["Location"].ToString();
            lblJobDesc.Text = Dr["JobDesc"].ToString();
        }

        Dr.Close();
    }
开发者ID:riteshdamedhar,项目名称:DevgiriRepo,代码行数:27,代码来源:ShowJobDetails.aspx.cs


示例17: CreateJobHistoryAction

        internal IPassthroughAction CreateJobHistoryAction(Uri requestUri, DataAccess.Context.ClusterContainer container,
                                                           string subscriptionId)
        {
            Contract.AssertArgNotNull(requestUri, "requestUri");
            Contract.AssertArgNotNull(requestUri.Segments, "requestUri.Segments");
            
            var lastSegs =
                requestUri.Segments.SkipWhile(i => i.ToLowerInvariant().Trim('/') != JobSubmissionConstants.ResourceExtentionName)
                          .ToList();
            Contract.AssertArgNotNull(lastSegs, "lastSegs");

            //If there is one segment, then we know that no JobId was passed, and we should list job history.
            if (lastSegs.Count() == 1)
            {
                return new ListJobsPassthroughAction(container, subscriptionId);
            }

            //If there are two segments, then an jobId was passed, and we should get job details.
            if (lastSegs.Count() == 2)
            {
                return new JobDetailsPassthroughAction(lastSegs.Last().Trim('/'), container, subscriptionId);
            }

            //If zero or more then two segments are present, then the request is invalid, and an action cannot be found to support it.
            throw new PassthroughActionProcessingException(string.Format(JobSubmissionConstants.JobHistoryRequestActionNotFound, container.DnsName, requestUri));
        }
开发者ID:RossMerr,项目名称:azure-sdk-for-net,代码行数:26,代码来源:PassthroughActionFactory.cs


示例18: CreateDonation

 public Donation CreateDonation(Donation donation)
 {
     using (var db = new DataAccess())
     {
         db.CreateStoredProcCommand("dbo.CreateDonation");
         db.AddInputParameter("@DonationProviderId", donation.DonationProviderId);
         db.AddInputParameter("@UserId", donation.UserId);
         db.AddInputParameter("@ExternalId", donation.ExternalId);
         db.AddInputParameter("@ExternalStatus", donation.ExternalStatus);
         db.AddInputParameter("@IsCompleted", donation.IsCompleted);
         db.AddInputParameter("@CountryId", donation.CountryId);
         db.AddInputParameter("@StateId", donation.StateId);
         db.AddInputParameter("@CityId", donation.CityId);
         db.AddInputParameter("@Amount", donation.Amount);
         db.AddInputParameter("@Currency", donation.Currency);
         db.AddInputParameter("@UserMessage", donation.UserMessage);
         db.AddInputParameter("@ProviderData", donation.ProviderXml);                
         db.AddInputParameter("@DonationSubscriptionId", donation.DonationSubscriptionId);
         db.AddInputParameter("@TransactionType", donation.TransactionType);
         db.AddOutputParameter("@DonationId", DbType.Int32);
         try
         {
             db.ExecuteNonQuery();
             donation.DonationId = db.GetParameterValue<int>("@DonationId");
         }
         catch (Exception ex)
         {
             Log.Error("Error while creating donation.", ex);
             throw;
         }
     }
     return donation;
 }
开发者ID:August2008,项目名称:August2008.org,代码行数:33,代码来源:DonationRepository.cs


示例19: Copy

 protected static void Copy(DataAccess.Semester obj, Semester newObj)
 {
     newObj.ID = obj.ID;
     newObj.Begin = obj.Begin;
     newObj.End = obj.End;
     newObj.Name = obj.Name;
 }
开发者ID:QuantumConcepts,项目名称:CodeGenerator,代码行数:7,代码来源:BaseServiceObjects.Generated.cs


示例20: CopyAndUpdateFields

        public int CopyAndUpdateFields(int SourceID, int? QuangCaoID, int? ViTriQuangCao, int? NhomSanPhamID,
            int? khuvucid, int? bak)
        {
            DataAccess objDataAccess = new DataAccess();
            using (SqlCommand sqlCmd = new SqlCommand())
            {
                int iID = 0;
                sqlCmd.CommandType = CommandType.StoredProcedure;
                sqlCmd.CommandText = "CopyAndUpdateFieldsViTriQuangCao";

                sqlCmd.Parameters.Add("@SourceID", SqlDbType.Int).Value = SourceID;
                sqlCmd.Parameters.Add("@QuangCaoID", SqlDbType.Int).Value = QuangCaoID;

                sqlCmd.Parameters.Add("@ViTriQuangCao", SqlDbType.Int).Value = ViTriQuangCao;

                sqlCmd.Parameters.Add("@NhomSanPhamID", SqlDbType.Int).Value = NhomSanPhamID;

                sqlCmd.Parameters.Add("@khuvucid", SqlDbType.Int).Value = khuvucid;

                sqlCmd.Parameters.Add("@bak", SqlDbType.Int).Value = bak;

                iID = objDataAccess.ExecuteScalar(sqlCmd);
                return iID;
            }
        }
开发者ID:dsbissett,项目名称:chonet,代码行数:25,代码来源:Base_ViTriQuangCao.cs



注:本文中的DataAccess类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DataAccessAdapterBase类代码示例发布时间:2022-05-24
下一篇:
C# Data类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap