Exemplo n.º 1
0
    private void Button1_Click(object sender, EventArgs e)
    {
        try {
            string pname = proVal.Value.Trim();
            if (string.IsNullOrEmpty(pname))
            {
                Common.MessageBox.Show(this, "属性值不能为空", Common.MessageBox.InfoType.warning);
                return;
            }

            var bl = new DS_PropertyValue_Br();
            var md = bl.CreateModel();
            md.PropertyValue = pname;
            md.PropertyID    = int.Parse(Request.QueryString["ProID"]);
            md.Px            = 0;
            bl.Add(md);
            bl.Sort(md.ID, true);
            Common.MessageBox.Show(this, "保存成功", Common.MessageBox.InfoType.info, "function(){location='list.aspx?ProID=" + md.PropertyID + "'}");
        }catch (Exception ex) {
            Common.WriteLog.SetErrLog(Request.Url.ToString(), "Button1_Click", ex.Message);
            if (ex.Message.Contains("IX_DS_PropertyValue"))
            {
                Common.MessageBox.Show(this, "已存在相同的值", Common.MessageBox.InfoType.error);
                return;
            }
            Common.MessageBox.Show(this, "保存发生意外,请联系管理人员解决。" + ex.Message, Common.MessageBox.InfoType.error);
        }
    }
Exemplo n.º 2
0
 private void Button1_Click(object sender, EventArgs e) {
     try {
         string pname = proVal.Value.Trim();
         if (string.IsNullOrEmpty(pname)) {
             Common.MessageBox.Show(this,"属性值不能为空",Common.MessageBox.InfoType.warning);
             return;
         }
        
         var bl = new DS_PropertyValue_Br();
         var md = bl.CreateModel();
         md.PropertyValue = pname;
         md.PropertyID = int.Parse(Request.QueryString["ProID"]);
         md.Px = 0;
         bl.Add(md);
         bl.Sort(md.ID,true);
         Common.MessageBox.Show(this, "保存成功", Common.MessageBox.InfoType.info, "function(){location='list.aspx?ProID="+md.PropertyID+"'}");
     }catch(Exception ex){
         Common.WriteLog.SetErrLog(Request.Url.ToString(), "Button1_Click", ex.Message);
         if (ex.Message.Contains("IX_DS_PropertyValue")) {
             Common.MessageBox.Show(this, "已存在相同的值", Common.MessageBox.InfoType.error);
             return;
         }
         Common.MessageBox.Show(this, "保存发生意外,请联系管理人员解决。"+ex.Message, Common.MessageBox.InfoType.error);
     }
 }
Exemplo n.º 3
0
    protected void LinkButtonPx_Click(object sender, EventArgs e)
    {
        var lb = (LinkButton)sender;
        var bl = new DS_PropertyValue_Br();

        bl.Sort(int.Parse(lb.Attributes["pid"]), bool.Parse(lb.Attributes["cn"]));
        AspNetPager_PageChanged(null, null);
    }
Exemplo n.º 4
0
 protected void LinkButtonPx_Click(object sender, EventArgs e)
 {
     var lb = (LinkButton)sender;
     var bl = new DS_PropertyValue_Br();
     bl.Sort(int.Parse(lb.Attributes["pid"]), bool.Parse(lb.Attributes["cn"]));
     AspNetPager_PageChanged(null, null);
 }