///

/// 更新社保补缴协议 /// /// /// public int UpdateSocialSecurityPaymentAgreementByID(SocialSecurityPaymentAgreementModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update SocialSecurityPaymentAgreement set "); strSql.Append("EmployeeName='@EmployeeName',"); strSql.Append("IDCardNumber='@IDCardNumber',"); strSql.Append("EmployeeNumber='@EmployeeNumber',"); strSql.Append("Telephone='@Telephone',"); strSql.Append("CompanyName='@CompanyName',"); strSql.Append("CompanyNumber='@CompanyNumber',"); strSql.Append("PaymentMonth='@PaymentMonth',"); strSql.Append("PaymentBase='@PaymentBase',"); strSql.Append("PaymentProportion='@PaymentProportion',"); strSql.Append("Payment='@Payment',"); strSql.Append("PaymentDeadline='@PaymentDeadline',"); strSql.Append("PaymentDeadline2='@PaymentDeadline2',"); strSql.Append("SigningTime='@SigningTime',"); strSql.Append("Number='@Number',"); strSql.Append("SigningPlace='@SigningPlace',"); strSql.Append("Remark='@Remark'"); strSql.Append(" where ID='@ID'"); SqlParameter[] parameters = { new SqlParameter("@EmployeeName", SqlDbType.NVarChar,50), new SqlParameter("@IDCardNumber", SqlDbType.VarChar,18), new SqlParameter("@EmployeeNumber", SqlDbType.NVarChar,20), new SqlParameter("@Telephone", SqlDbType.VarChar,20), new SqlParameter("@CompanyName", SqlDbType.NVarChar,50), new SqlParameter("@CompanyNumber", SqlDbType.NVarChar,50), new SqlParameter("@PaymentMonth", SqlDbType.NVarChar,50), new SqlParameter("@PaymentBase", SqlDbType.Decimal,9), new SqlParameter("@PaymentProportion", SqlDbType.Decimal,9), new SqlParameter("@Payment", SqlDbType.Decimal,9), new SqlParameter("@PaymentDeadline", SqlDbType.DateTime), new SqlParameter("@SigningTime", SqlDbType.DateTime), new SqlParameter("@Number", SqlDbType.NVarChar,50), new SqlParameter("@SigningPlace", SqlDbType.NVarChar,50), new SqlParameter("@PaymentDeadline2", SqlDbType.DateTime), new SqlParameter("@Remark", SqlDbType.NVarChar,200), new SqlParameter("@ID", SqlDbType.Int,4) }; parameters[0].Value = model.EmployeeName; parameters[1].Value = model.IDCardNumber; parameters[2].Value = model.EmployeeNumber; parameters[3].Value = model.Telephone; parameters[4].Value = model.CompanyName; parameters[5].Value = model.CompanyNumber; parameters[6].Value = model.PaymentMonth; parameters[7].Value = model.PaymentBase; parameters[8].Value = model.PaymentProportion; parameters[9].Value = model.Payment; parameters[10].Value = model.PaymentDeadline; parameters[11].Value = model.SigningTime; parameters[12].Value = model.Number; parameters[13].Value = model.SigningPlace; parameters[14].Value = model.PaymentDeadline2; parameters[15].Value = model.Remark; parameters[16].Value = model.ID;

int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
return rows;

}

///

/// 删除社保补缴协议 /// /// /// public int DeleteSocialSecurityPaymentAgreementByID(int ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("delete from SocialSecurityPaymentAgreement "); strSql.Append(" where ID='@ID'"); SqlParameter[] parameters = { new SqlParameter("@ID", SqlDbType.Int,4) }; parameters[0].Value = ID;

int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
return rows;

} ///

/// 根据ID获取社保补缴协议 /// /// /// public SocialSecurityPaymentAgreementModel GetSocialSecurityPaymentAgreementByID(int ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select top 1 ID,EmployeeName,IDCardNumber,EmployeeNumber,Telephone,CompanyName,CompanyNumber,PaymentMonth,PaymentBase,PaymentProportion,Payment,PaymentDeadline,SigningTime,Number,SigningPlace,PaymentDeadline2,Remark from SocialSecurityPaymentAgreement "); strSql.Append(" where ID='@ID'"); SqlParameter[] parameters = { new SqlParameter("@ID", SqlDbType.Int,4) }; parameters[0].Value = ID;

SocialSecurityPaymentAgreementModel model = new SocialSecurityPaymentAgreementModel();
DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
if (ds.Tables[0].Rows.Count > 0)
{
    return DataRowToSocialSecurityPaymentAgreementModel(ds.Tables[0].Rows[0]);
}
else
{
    return null;
}

} #endregion ExtensionMethod }

社保补缴协议管理 - 增删改查接口

原文地址: https://www.cveoy.top/t/topic/lmvk 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录