Ejemplo n.º 1
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     string text = this.txtName.Text;
     string str2 = this.txtImgUrl.Text;
     string str3 = this.txtLinkUrl.Text;
     string str4 = this.txtLinkDesc.Text;
     int num = int.Parse(this.dropState.SelectedValue);
     int num2 = int.Parse(this.txtOrderID.Text);
     string str5 = this.txtContactPerson.Text;
     string str6 = this.txtEmail.Text;
     string str7 = this.txtTelPhone.Text;
     int num3 = int.Parse(this.dropTypeID.SelectedValue);
     Maticsoft.Model.Settings.FriendlyLink model = new Maticsoft.Model.Settings.FriendlyLink {
         Name = text,
         ImgUrl = str2,
         LinkUrl = str3,
         LinkDesc = str4,
         State = num,
         OrderID = num2,
         ContactPerson = str5,
         Email = str6,
         TelPhone = str7,
         TypeID = num3
     };
     Maticsoft.BLL.Settings.FriendlyLink link2 = new Maticsoft.BLL.Settings.FriendlyLink();
     if (link2.Add(model) > 0)
     {
         MessageBox.ShowSuccessTip(this, Site.TooltipSaveOK, "List.aspx");
     }
     else
     {
         MessageBox.ShowFailTip(this, Site.TooltipSaveError, "List.aspx");
     }
 }
Ejemplo n.º 2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     string text = this.txtName.Text;
     string str2 = this.txtImgUrl.Text;
     int num = Globals.SafeInt(this.txtImgWidth.Text, 0);
     int num2 = Globals.SafeInt(this.txtImgHeight.Text, 0);
     string str3 = this.txtLinkUrl.Text;
     string str4 = this.txtLinkDesc.Text;
     int num3 = int.Parse(this.txtOrderID.Text);
     string str5 = this.txtContactPerson.Text;
     string str6 = this.txtEmail.Text;
     string str7 = this.txtTelPhone.Text;
     int num4 = int.Parse(this.dropTypeID.SelectedValue);
     bool flag = this.radioBtnYes.Checked;
     Maticsoft.Model.Settings.FriendlyLink model = new Maticsoft.Model.Settings.FriendlyLink {
         Name = text,
         ImgUrl = str2,
         ImgWidth = new int?(num),
         ImgHeight = new int?(num2),
         LinkUrl = str3,
         LinkDesc = str4,
         OrderID = num3,
         ContactPerson = str5,
         Email = str6,
         TelPhone = str7,
         TypeID = num4,
         IsDisplay = flag
     };
     Maticsoft.BLL.Settings.FriendlyLink link2 = new Maticsoft.BLL.Settings.FriendlyLink();
     if (link2.Add(model) > 0)
     {
         MessageBox.ShowSuccessTip(this, Site.TooltipSaveOK, "ListNew.aspx");
     }
     else
     {
         MessageBox.ShowFailTip(this, Site.TooltipSaveError, "ListNew.aspx");
     }
 }