Exemple #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");
     }
 }
Exemple #2
0
        private void ShowInfo(int ID)
        {
            Maticsoft.Model.Settings.FriendlyLink model = new Maticsoft.BLL.Settings.FriendlyLink().GetModel(ID);
            this.lblID.Text = model.ID.ToString();
            this.lblName.Text = model.Name;
            this.imgImgUrl.ImageUrl = model.ImgUrl;
            this.lblLinkUrl.Text = model.LinkUrl;
            this.lblLinkDesc.Text = model.LinkDesc;
            this.lblState.Text = null;
            switch (Convert.ToInt32(model.State))
            {
                case 0:
                    this.lblState.Text = Site.Unaudited;
                    break;

                case 1:
                    this.lblState.Text = Site.btnApproveText;
                    break;

                default:
                    this.lblState.Text = Site.Unknown;
                    break;
            }
            this.lblOrderID.Text = model.OrderID.ToString();
            this.lblContactPerson.Text = model.ContactPerson;
            this.lblEmail.Text = model.Email;
            this.lblTelPhone.Text = model.TelPhone;
            this.lblTypeID.Text = null;
            switch (Convert.ToInt32(model.TypeID))
            {
                case 0:
                    this.lblTypeID.Text = SiteSetting.lblImgLink;
                    return;

                case 1:
                    this.lblTypeID.Text = SiteSetting.lblTextLink;
                    return;
            }
            this.lblTypeID.Text = Site.Unknown;
        }
Exemple #3
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");
     }
 }
Exemple #4
0
        private void ShowInfo(int ID)
        {
            Maticsoft.Model.Settings.FriendlyLink model = new Maticsoft.BLL.Settings.FriendlyLink().GetModel(ID);
            this.lblID.Text = model.ID.ToString();
            this.lblName.Text = model.Name;
            this.imgImgUrl.ImageUrl = model.ImgUrl;
            this.lblImgWidth.Text = model.ImgWidth.ToString();
            this.lblImgHeight.Text = model.ImgWidth.ToString();
            this.lblLinkUrl.Text = model.LinkUrl;
            this.lblLinkDesc.Text = model.LinkDesc;
            this.lblIsDisplay.Text = null;
            if (model.IsDisplay)
            {
                this.lblIsDisplay.Text = SiteSetting.lblYes;
            }
            else
            {
                this.lblIsDisplay.Text = SiteSetting.lblNo;
            }
            this.lblOrderID.Text = model.OrderID.ToString();
            this.lblContactPerson.Text = model.ContactPerson;
            this.lblEmail.Text = model.Email;
            this.lblTelPhone.Text = model.TelPhone;
            this.lblTypeID.Text = null;
            switch (Convert.ToInt32(model.TypeID))
            {
                case 0:
                    this.lblTypeID.Text = SiteSetting.lblImgLink;
                    return;

                case 1:
                    this.lblTypeID.Text = SiteSetting.lblTextLink;
                    return;
            }
            this.lblTypeID.Text = Site.Unknown;
        }
 public ActionResult FriendLink()
 {
     List<Maticsoft.Model.Settings.FriendlyLink> modelList = new Maticsoft.BLL.Settings.FriendlyLink().GetModelList(10, 1);
     return base.View(modelList);
 }
 public ActionResult Alinks(int top, string viewName = "Alinks")
 {
     List<Maticsoft.Model.Settings.FriendlyLink> modelList = new Maticsoft.BLL.Settings.FriendlyLink().GetModelList(top, 0);
     return base.View(viewName, modelList);
 }
 public ActionResult AlinkDetail(int aid = -1, string viewName = "AlinkDetail")
 {
     Maticsoft.Model.Settings.FriendlyLink modelByCache = new Maticsoft.BLL.Settings.FriendlyLink().GetModelByCache(aid);
     return base.View(viewName, modelByCache);
 }
Exemple #8
0
 private void ShowInfo(int ID)
 {
     Maticsoft.Model.Settings.FriendlyLink model = new Maticsoft.BLL.Settings.FriendlyLink().GetModel(ID);
     this.lblID.Text = model.ID.ToString();
     this.txtName.Text = model.Name;
     this.txtImgUrl.Text = model.ImgUrl;
     this.imgImgUrl.ImageUrl = model.ImgUrl;
     this.txtLinkUrl.Text = model.LinkUrl;
     this.txtLinkDesc.Text = model.LinkDesc;
     this.dropState.SelectedValue = model.State.ToString();
     this.txtOrderID.Text = model.OrderID.ToString();
     this.txtContactPerson.Text = model.ContactPerson;
     this.txtEmail.Text = model.Email;
     this.txtTelPhone.Text = model.TelPhone;
     this.dropTypeID.SelectedValue = model.TypeID.ToString();
 }