我从昨天起就一直试图这样做,但想不到解决方案.我有一个包含复选框和文件上载的转发器,这个转发器根据我的表的内容重复多次.选中文件上传下方的复选框时,它不应检查文件上载量.我想不出有什么方法可以做到这一点.有任何想法吗?继承人的代码.
班级:
protected void UploadButton_Click(object sender, EventArgs e)
{
String savePath = @"~/files/";
try
{
foreach (RepeaterItem item in rptVrijstellingen.Items)
{
FileUpload file=(FileUpload)item.FindControl("FileUpload1");
HiddenField uid = (HiddenField)item.FindControl("hiddenid");
CheckBox ch = (CheckBox)item.FindControl("CBupload");
if(ch.Checked)
Response.Write("checked");
else
{
if (file.HasFile)
{
String fileName = file.FileName;
savePath += fileName;
file.SaveAs(Server.MapPath(savePath + fileName));
tblBijlage s = new tblBijlage();
s.bijlageTitel = fileName;
s.bijlageURL = savePath;
s.bijlageType = "1";
s.fk_externvakID = Convert.ToInt16(uid.Value);
BLLstudent.insertFile(s);
}
else
throw new Exception("Gelieve bij alle vakken een file toe te voegen of …Run Code Online (Sandbox Code Playgroud) 我想在再次填充之前从我的 xml 文件中删除所有子项(或创建更新,但这似乎更难)。所以我所做的是
$file = "data.xml";
$xml=simplexml_load_file($file);
$teller=0;
foreach( $entries as $entry ) {
foreach ($xml->xpath('//concerts') as $desc) {
if($teller == 0)
{
$lol=$desc->children();
unset($lol);
}
$concert = $desc->addChild( 'concert' );
$concert->addChild( 'artist', array_shift( $entry ) );
$concert->addChild( 'location', array_shift( $entry ) );
$concert->addChild( 'date', array_shift( $entry ) );
$teller++;
}
}
file_put_contents($file, $xml->asXML());
Run Code Online (Sandbox Code Playgroud)
但这并不能消除任何东西,对我做错了什么有什么想法吗?
所以问题是我的语言适用于我的日历,但不适用于解析.下面是我的代码(我将其作为网站上的示例).
$(function(){
$.datepicker.setDefaults($.datepicker.regional['nl-BE']);
// Datepicker
$('#datepicker').datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
inline: true,
onSelect: function(dateText){
var datez = $.datepicker.parseDate('dd/mm/yy',dateText,{shortYearCuroff: 20, dayNamesShort: $.datepicker.regional['nl-BE'].dayNamesShort, dayNames: $.datepicker.regional['nl-BE'].dayNames, monthNamesShort: $.datepicker.regional['nl-BE'].monthNamesShort, monthNames: $.datepicker.regional['nl-BE'].monthNames}).toString();
var value = datez.split('00:00:00');
generatexml(dateText,value);
}
});
});
Run Code Online (Sandbox Code Playgroud)
这导致我的日历语言发生了变化,但解析后的语言却没有变化?知道我做错了什么吗?
2012年3月24日星期六
给出的结果,我也试图把月份放在月份之前有任何结果:(
jquery jquery-ui datepicker uidatepicker jquery-ui-datepicker
我有一个包含多个网站和多个商店的magento设置,我想检查商店是否以编程方式包含相同的产品。因为我正在为其编写模块,所以我重写了产品模块,因此我可以$this->product()->getid()毫无问题地进行访问。我检查了网站列表($ this-> product()),但在那儿找不到它。任何想法我怎么开始呢?