Пример #1
0
        protected void deleteMessage_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                foreach (RepeaterItem item in listMessage.Controls)
                {
                    if ((item.FindControl("selectMessage") as CheckBox).Checked)
                    {
                        if (WhatList.Value.ToLower() == "new")
                        {
                            Mail.DeleteInputMessage(int.Parse((item.FindControl("message_id") as HiddenField).Value));
                        }
                        else if (WhatList.Value.ToLower() == "sent")
                        {
                            Mail.DeleteOutputMessage(int.Parse((item.FindControl("message_id") as HiddenField).Value));
                        }
                    }
                }
            }
            catch (Exception ex) {
                MessageError.Text = ex.Message;
                MessageError.Visible = true;
            }

            refreshMessage_Click(sender, e);
        }
        protected void btnChange_Click1(object sender, ImageClickEventArgs e)
        {
            DataSet ds = new DataSet();
            DataTable dtUserExist = new DataTable();

            objClient.User_Name = (Session["user"]).ToString();

            objClient.Current_Password = DESEncrypt(txtCurrentPassword.Text);
            ds = objClient.Load_User_Password_By_Id(objClient);
            dtUserExist = ds.Tables[0];
            if (dtUserExist.Rows[0][0].ToString() == "true")
            {
                objClient.New_Password = DESEncrypt(txtNewPassword.Text);
                objClient.Change_User_Password(objClient);
                // string email = objClient.Load_User_Current_Email_By_Id(objClient);
                //  string username = objClient.Load_User_Current_Username_By_Id(objClient);
                // FileShareApp.Business.Email.sendMail("*****@*****.**", email, "", "", "AFOC File Portal Password Notification", "<pre><h1>AFOC File Portal Password Notification</h1><h3><br/><br/>Dear " + username + ",<br/>        We have received a request from AFOC File Portal that you have changed the password for User in AFOC File Portal. We are sending your newly updated password along with this email. Please note the updated password for using the AFOC File Portal website.<br/><br/>        Your new password for VAM Systems login is.<br/>        " + txtNewPassword.Text + "<br/><br/>        If you do not changed, kindly  inform us.<br/><br/> Thank You,<br/> afocfileapp.com <br/> P.O Box:6382,<br/> Abu Dhabi,<br/> United Arab Emirates <br/><br/>Request generated by: <br/> URL:<a href='http://www.afocfileapp.com'> http://www.afocfileapp.com </a></h3></pre>");
                //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Success", "alert('Successfully changed')", true);
                divLoginError.Visible = false;
                lblLoginSuccess.Text = "Password Successfully Changed.";
                divLoginSuccess.Visible = true;
            }
            else
            {
                //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Failed", "alert('Invalid current password')", true);
                divLoginSuccess.Visible = false;
                lblLoginError.Text = "Invalid current password.";
                divLoginError.Visible = true;
            }
        }
Пример #3
0
 protected void Submit_Click(object sender, ImageClickEventArgs e)
 {
     if (string.IsNullOrEmpty(UserName.Value) || string.IsNullOrEmpty(Password.Value) || string.IsNullOrEmpty(Code.Value))
         ClientScript.RegisterStartupScript(GetType(), "OnSubmit", "<script>alert('输入不能为空')</script>");
     else
     {
         if (Code.Value.ToLower() == Session["checkCode"].ToString())
         {
             List<UserModel>  list = bll.UserLogin(UserName.Value, Password.Value);                    
             if (list.Count == 0)
             {
                 ClientScript.RegisterStartupScript(GetType(), "OnSubmit", "<script>alert('用户名或密码错误')</script>");
             }
             else
             {
                 Session["User"] = list[0];
                 if (list[0].UserType == 1)
                     Response.Redirect("Admin/Default.aspx");
                 else
                     Response.Redirect("MyHouse/Default.aspx");
             }
         }
         else
             ClientScript.RegisterStartupScript(GetType(), "OnSubmit", "<script>alert('验证码错误')</script>");
     }
 }
Пример #4
0
        protected void btn_Like_Click(object sender, ImageClickEventArgs e)
        {
            using (TriglavBL temp = new TriglavBL())
            {
                user_likes = temp.getUserLikes(korisnik.id, post.id);

                if (user_likes == null)
                {
                    user_likes = new Data.EntityFramework.DAL.User_Likes();
                    user_likes.PostId = post.id;
                    user_likes.UserId = korisnik.id;
                    user_likes.DaumRated = DateTime.Now;
                    user_likes.DatumLajkanja = DateTime.Now;
                    user_likes.isLiked = 1;
                    user_likes.Rate = 0;
                    temp.SaveUser_Likes(user_likes);
                }
                else
                {
                    Int32 LikesBefore = temp.getVoteUserLikes(user_likes.UserId.Value, user_likes.PostId.Value);
                    user_likes.DatumLajkanja = DateTime.Now;
                    user_likes.isLiked = 1;
                    temp.UpdateUser_Likes(user_likes, LikesBefore);
                }
            }
            LoadClanak(post.id);
        }
Пример #5
0
 protected void imgNovo_Click(object sender, ImageClickEventArgs e)
 {
     pnlDadosModelo.Visible = true;
     hfIdModelo.Value = string.Empty;
     LimpaCampos();
     lblMsg.Text = "Criando novo modelo...";
 }
Пример #6
0
        protected void OKButton_Click(object sender, ImageClickEventArgs e)
        {
            try
            {            
                var itemKey = ViewState["QueueItem"] as ServerEntityKey;
                var controller = new DuplicateSopEntryController();
                ProcessDuplicateAction action = ProcessDuplicateAction.OverwriteAsIs;
                if (UseExistingSopRadioButton.Checked)
                    action = ProcessDuplicateAction.OverwriteUseExisting;
                else if (UseDuplicateRadioButton.Checked)
                    action = ProcessDuplicateAction.OverwriteUseDuplicates;
                else if (DeleteDuplicateRadioButton.Checked)
                    action = ProcessDuplicateAction.Delete;
                else if (ReplaceAsIsRadioButton.Checked)
                    action = ProcessDuplicateAction.OverwriteAsIs;

                controller.Process(itemKey, action);
            }
            catch (Exception ex)
            {
                MessageBox.Message = String.Format(ErrorMessages.ActionNotAllowedAtThisTime, ex.Message);
                MessageBox.MessageType = MessageBox.MessageTypeEnum.ERROR;
                MessageBox.Show();
            }

            //((Default) Page).UpdateUI();
            Close();
        }
        protected void OKButton_Click(object sender, ImageClickEventArgs e)
        {
            if (OKClicked != null)
                OKClicked();

            Close();
        }
Пример #8
0
        protected void clearButton_Click(object sender, ImageClickEventArgs e)
        {
            fillUpnTable();
            fillProducts();

            Upn.Text = "";
            Upn2.Text = "";
            Product.Text = "";

            clearOperationTable1();
            clearOperationTable();

            clearProcesses();
            clearProcesses1();

            clearRecipeUpn1();
            clearRecipeUpn();

            RecipeUpn1.Enabled = false;
            upnEnable.Items[0].Enabled = false;
            upnEnable.Items[0].Selected = false;

            multisessionEnable.Items[0].Enabled = false;
            multisessionEnable.Items[0].Selected = false;

            FirstDIV.Visible = true;
            SecondDIV.Visible = false;

            HttpContext.Current.Session["operation"] = "no_op";
            HttpContext.Current.Session["IdUpn"] = null;
        }
 protected void btnAttendanceHistory_Click(object sender, ImageClickEventArgs e)
 {
     if (Request.QueryString["mid"] != null)
     {
         Response.Redirect("~//topcare/admin//AttendanceHistory.aspx?mid=" + Request.QueryString["mid"]);
     }
 }
Пример #10
0
        //protected void distanceGridView_RowDataBound(object sender, GridViewRowEventArgs e)
        //{
        //    e.Row.Cells[0].Visible = false;
        //    e.Row.Cells[1].Visible = false;
        //    e.Row.Cells[2].Visible = false;
        //    TableCell imageCell = new TableCell();
        //    TableCell nameCell = new TableCell();
        //    e.Row.Cells.Add(imageCell);
        //    e.Row.Cells.Add(nameCell);
        //    if (e.Row.RowType == DataControlRowType.Header)
        //    {
        //        e.Row.Cells[4].Text = "Name";
        //        e.Row.Cells[5].Text = "Bild";
        //    }
        //    if (e.Row.RowType == DataControlRowType.DataRow)
        //    {
        //        Mitglied mitglied = Datareader.getMitgliedByID(Int64.Parse(e.Row.Cells[2].Text));
        //        e.Row.Cells[4].Text = mitglied.mitgliedVorname + System.Environment.NewLine + mitglied.mitgliedNachname;
        //        ImageButton goProfileButton = new ImageButton();
        //        goProfileButton.Enabled = true;
        //        goProfileButton.ID = mitglied.mitgliedID.ToString();
        //        goProfileButton.Visible = true;
        //        //goProfileButton.ImageUrl = "Images/Template_redaccent/ButtonZumProfilNormal.png";
        //        goProfileButton.ImageUrl = "images.aspx?ImageID=" + mitglied.mitgliedID.ToString();
        //        goProfileButton.Width = 35;
        //        goProfileButton.Height = 50;
        //        goProfileButton.Click += new ImageClickEventHandler(directToProfileNew);
        //        e.Row.Cells[5].Controls.Add(goProfileButton);
        //    }
        //}
        //private void directToProfileNew(object sender, EventArgs e)
        //{
        //    //Session["profileUser"]
        //    ImageButton pushdBtn = (ImageButton)sender;
        //    Session["profileUser"] = pushdBtn.ID.ToString();
        //    Response.Redirect("profile.aspx");
        //    throw new NotImplementedException();
        //}
        protected void searchDistanceImageButton_Click(object sender, ImageClickEventArgs e)
        {
            Session["distanceSearch"] = double.Parse(distanceSearchTextBox.Text);
            Response.Redirect("advancedsearchresults.aspx");

            //Int64 currentUser = Int64.Parse(Session["currentUser"].ToString());
            //double distance = double.Parse(distanceSearchTextBox.Text);
            //List<DistancedMember> result = AdvancedSearcher.doDistanceSearch(distance, currentUser);
            //Nullable<double>[,] array1 = new Nullable<double>[result.Count, 2];
            ////Nullable<double>[] distanceArray = new Nullable<double>[result.Count];
            //int ctr = 0;
            //foreach(DistancedMember currentResult in result)
            //{
            //    //distanceArray[ctr] = currentResult.distance;
            //    array1[ctr, 0] = currentResult.mitgliedData.mitgliedID;
            //    array1[ctr, 1] = currentResult.distance;
            //    ctr++;
            //}
            ////distanceGridView.DataSource = distanceArray;
            ////distanceGridView.DataBind();

            //System.Collections.ArrayList arrList = new System.Collections.ArrayList();
            //for (int i = 0; i < result.Count; i++)
            //{
            //    arrList.Add(new ListItem(array1[i, 0].ToString(), array1[i, 1].ToString()));
            //}
            //distanceGridView.DataSource = arrList;
            //distanceGridView.DataBind();
        }
        protected void btnUpdate_Click(object sender, ImageClickEventArgs e)
        {
            float f = 0;
            TextBox TxCosto = (TextBox)FormViewArticolo.FindControl("txCosto");
            TxCosto.Text = TxCosto.Text.Replace(".", ",");

            FormViewArticolo.UpdateItem(true);

            TextBox TxIDArticolo = (TextBox)FormViewArticolo.FindControl("txIDArticolo");
            TextBox TxImporto = (TextBox)FormViewArticolo.FindControl("txImporto");




            string sql = @"UPDATE    ListinoRighe
                        SET              Importo = @IMPORTO, DateMod = GETDATE()
                        WHERE     (IDArticolo = @IDArticoli) AND (IDListino = '1221/gen1')";
            SqlConnection cnn = new SqlConnection(SqlDataSource1.ConnectionString);
            SqlCommand cmd = new SqlCommand(sql, cnn);

            TxImporto.Text = TxImporto.Text.Replace(".", ",");
            float.TryParse(TxImporto.Text, out f);
            SqlParameter parImporto = new SqlParameter("@Importo", f);
            cmd.Parameters.Add(parImporto);
            SqlParameter parIDArticolo = new SqlParameter("@IDArticoli", TxIDArticolo.Text);
            cmd.Parameters.Add(parIDArticolo);
            cnn.Open();
            cmd.ExecuteNonQuery();
            cnn.Close();

            Response.Redirect(ViewState["PreviousPage"].ToString());
        }
Пример #12
0
        void ibtnPublish_Click(object sender, ImageClickEventArgs e)
        {
            for (int i = 0; i < gvNews.Rows.Count; i++)
            {
                CheckBox chkItem = (CheckBox)gvNews.Rows[i].FindControl("chkItemUnique");
                if (null == chkItem)
                    continue;
                if (!chkItem.Checked)
                    continue;
                HtmlInputHidden hdnID = (HtmlInputHidden)gvNews.Rows[i].FindControl("hdnID");
                if (null == hdnID)
                    return;
                int _id = Convert.ToInt32(hdnID.Value);

                NewsItem _news = NewsItemManager.GetByID(_id);
                if (_news == null)
                    continue;

                _news.PublishFrom = new DateTime(1993, 1, 1).ToString("dd/MM/yyyy");
                _news.PublishTo = new DateTime(1992, 1, 1).ToString("dd/MM/yyyy");

                NewsItemManager.Update(_news);
            }
            BindGrid(10);
            AddMode();

            plcControls.Visible = false;
            upnlGrid.Update();
            upnlControls.Update();
        }
Пример #13
0
        protected void ImageButtonSave_Click(object sender, ImageClickEventArgs e)
        {
            SqlConnection sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ProfilesConnectionString"].ConnectionString);
            SqlCommand sqlCmd = new SqlCommand("sp_profileAdminSave", sqlConn);

            try
            {
                sqlCmd.CommandType = CommandType.StoredProcedure;
                sqlCmd.Parameters.Add("@ProfileId", SqlDbType.Int).Value = Convert.ToInt32(LabelProfileId.Text);
                sqlCmd.Parameters.Add("@ProfileStatus", SqlDbType.Bit).Value = Convert.ToBoolean(DropDownListProfileStatus.SelectedValue);
                sqlCmd.Parameters.Add("@VerificationStatus", SqlDbType.Bit).Value = Convert.ToBoolean(DropDownListVerificationStatus.SelectedValue);
                sqlCmd.Parameters.Add("@OwnershipStatus", SqlDbType.Int).Value = Convert.ToInt32(DropDownListOwnershipStatus.SelectedValue);
                sqlCmd.Parameters.Add("@PopularityStatus", SqlDbType.Bit).Value = Convert.ToBoolean(DropDownListPopularityStatus.SelectedValue);
                sqlCmd.Parameters.Add("@OwnerId", SqlDbType.Int).Value = Convert.ToInt32(TextBoxOwnerId.Text);
                sqlConn.Open();
                sqlCmd.ExecuteNonQuery();

                LabelMessage.Visible = true;
                LabelMessage.Text = "تنظیمات به روزرسانی شد.";
                LabelMessage.CssClass = "SuccessMessage";
            }
            catch (Exception ex)
            {

            }
            finally
            {
                sqlConn.Close();
                sqlCmd.Dispose();
                sqlConn.Dispose();
            }
        }
Пример #14
0
        protected void PDFButtonClick(object sender, ImageClickEventArgs e)
        {
            string t = string.Empty;
            string t2 = string.Empty;
            if ((!string.IsNullOrEmpty(HiddenToField.Value)))
            {
                t = String.Format("{0:MM/dd/yyyy}", Convert.ToDateTime(HiddenToField.Value));
            }

            if ((!string.IsNullOrEmpty(HiddenFromField.Value)))
            {
                t2 = String.Format("{0:MM/dd/yyyy}", Convert.ToDateTime(HiddenFromField.Value));
            }

            //if (!string.IsNullOrEmpty(t))
            //    {
            //        t = null;
            //    }
            //    if (!string.IsNullOrEmpty(t2))
            //    {
            //        t2 = null;
            //    }

            Response.Redirect("IFrame/ExecutiveDownload.aspx?t1=" + t + "&t2=" + t2);
        }
Пример #15
0
 protected void IbtnEnter_Click(object sender, ImageClickEventArgs e)
 {
     B_User bll = new B_User();
     string vCode = this.Session["ValidateCode"].ToString();
     if (string.IsNullOrEmpty(vCode))
     {
         function.WriteErrMsg("<li>验证码无效,请刷新验证码重新登录</li>", "/User/Login.aspx");
     }
     if (string.Compare(this.TxtValidateCode.Text.Trim(), vCode, true) != 0)
     {
         function.WriteErrMsg("<li>验证码不正确</li>", "Login.aspx");
     }
     //根据用户名和密码验证会员身份,并取得会员信息
     string AdminName = this.TxtUserName.Text.Trim();
     string AdminPass = this.TxtPassword.Text.Trim();
     M_UserInfo info = bll.AuthenticateUser(AdminName, AdminPass);
     //如果用户Model是空对象则表明登录失败
     if (info.IsNull)
     {
         function.WriteErrMsg("<li>用户名或密码错误!</li>", "/User/Login.aspx");
     }
     else
     {
         if (SiteConfig.UserConfig.AdminCheckReg)
         {
             if (info.Status != 0)
             {
                 function.WriteErrMsg("<li>你的帐户未通过验证,请与超级管理员联系</li>", "/User/Login.aspx");
             }
         }
         bll.SetLoginState(info);
         HttpContext.Current.Response.Redirect("Default.aspx");
     }
 }
 //重置
 protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
 {
     this.txtUname.Text = "";
     this.txtPwd.Text = "";
     this.txtPwdagain.Text = "";
     this.txtUname.Focus();
 }
        protected void btnDelete1_Click(object sender, ImageClickEventArgs e)
        {
            string strLink = "";
            try
            {
                var n_info = DB.GetTable<ESHOP_CATEGORy>().Where(n => n.CAT_ID == m_cat_id);

                if (n_info.ToList().Count > 0)
                {
                    if (!string.IsNullOrEmpty(n_info.ToList()[0].CAT_IMAGE1))
                    {
                        string imagePath = Server.MapPath(PathFiles.GetPathCategory(m_cat_id) + n_info.ToList()[0].CAT_IMAGE1);
                        n_info.ToList()[0].CAT_IMAGE1 = "";
                        DB.SubmitChanges();

                        if (File.Exists(imagePath))
                            File.Delete(imagePath);

                        strLink = "category.aspx?cat_id=" + m_cat_id;
                    }
                }
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
            finally
            {
                if (!string.IsNullOrEmpty(strLink))
                    Response.Redirect(strLink);
            }
        }
 /// <summary>
 /// 清空
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void IBtn_Empty_Click(object sender, ImageClickEventArgs e)
 {
     txt_biaoshiNo.Value = "";
     Pager_DocumentShare.CurrentPageIndex = 1;
     LoadDataBind(strWhere);
     UP_DocumentShare.Update();
 }
        //Approve expense if expense exceeded show warning
        protected void btnApprove_Click(object sender, ImageClickEventArgs e)
        {
            ImageButton btn = (ImageButton)(sender);
            string[] arg = new string[2];
            arg = btn.CommandArgument.ToString().Split(',');
            int expenseId = Convert.ToInt32(arg[0]);
            decimal expenseTotal = Convert.ToDecimal(arg[1]);
            comBudget.CompanyBudget();

            //if (expenseTotal > comBudget.RemainingAmountAccounts)
            if (comBudget.IsBudgetExceeded(expenseTotal))
            {
                //DialogResult UserReply = MessageBox.Show("Approving this expense " + expenseTotal + " will cross the total monthly budget of the company. Do you want to approve?", "Important Question", MessageBoxButtons.YesNoCancel);

                //if (UserReply.ToString() == "Yes")
                //{
                //    expReportBuilder.AccountantActionOnExpenseReport(expenseId, emp.UserId, ReportStatus.ApprovedByAccounts.ToString());
                //}
                //else if (UserReply.ToString() == "No")
                //{
                //    expReportBuilder.AccountantActionOnExpenseReport(expenseId, emp.UserId, ReportStatus.RejectedByAccounts.ToString());
                //}

                lblBudgetWarning.Text = "Approving this expense for " + String.Format("{0:c}", expenseTotal) + " will result in the monthly company budget being exceeded, do you want to approve?";
                hdnExpenseId.Value = expenseId.ToString();
                ClientScript.RegisterStartupScript(this.GetType(), "BudgetWarningModal", "ShowBudgetWarningModal();", true);

            }
            else
            {
                expReportBuilder.AccountantActionOnExpenseReport(expenseId, emp.UserId, ReportStatus.ApprovedByAccounts.ToString());
            }

            InitializeRepeater();
        }
Пример #20
0
 protected void btnPDF_Click(object sender, ImageClickEventArgs e)
 {
     Response.ContentType = "application/pdf";
     Response.AddHeader("content-disposition", "attachment;filename=UserDetails.pdf");
     Response.Cache.SetCacheability(HttpCacheability.NoCache);
     var sw = new StringWriter();
     var hw = new HtmlTextWriter(sw);
     gvdetails.AllowPaging = false;
     gvdetails.DataBind();
     gvdetails.RenderControl(hw);
     gvdetails.HeaderRow.Style.Add("width", "15%");
     gvdetails.HeaderRow.Style.Add("font-size", "10px");
     gvdetails.Style.Add("text-decoration", "none");
     gvdetails.Style.Add("font-family", "Arial, Helvetica, sans-serif;");
     gvdetails.Style.Add("font-size", "8px");
     var sr = new StringReader(sw.ToString());
     var pdfDoc = new Document(PageSize.A2, 7f, 7f, 7f, 0f);
     var htmlparser = new HTMLWorker(pdfDoc);
     PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
     pdfDoc.Open();
     htmlparser.Parse(sr);
     pdfDoc.Close();
     Response.Write(pdfDoc);
     Response.End();
 }
        protected void btnDelete1_Click(object sender, ImageClickEventArgs e)
        {
            string strLink = "";
            try
            {
                var n_info = DB.GetTable<ESHOP_NEWS_ATT>().Where(n => n.NEWS_ATT_ID == m_att_id);

                if (n_info.ToList().Count > 0)
                {
                    if (!string.IsNullOrEmpty(n_info.ToList()[0].NEWS_ATT_FILE))
                    {
                        string imagePath = Server.MapPath(PathFiles.GetPathNews(m_news_id) + n_info.ToList()[0].NEWS_ATT_FILE);
                        n_info.ToList()[0].NEWS_ATT_FILE = "";
                        DB.SubmitChanges();

                        if (File.Exists(imagePath))
                            File.Delete(imagePath);

                        strLink = "news_attachment.aspx?type="+_type+"&att_id=" + m_att_id + "&news_id=" + m_news_id;
                    }
                }
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
            finally
            {
                if (!string.IsNullOrEmpty(strLink))
                    Response.Redirect(strLink);
            }
        }
 protected void deptButton_Click(object sender, ImageClickEventArgs e)
 {
     System.Web.UI.WebControls.ImageButton imgButton = (System.Web.UI.WebControls.ImageButton)sender;
     if (imgButton != null)
     {
         if (imgButton.ID.Contains("department"))
         {
             drdDepartment.ClearSelection();
             drdDepartment_SelectionChanged(null, null);
         }
         else if (imgButton.ID.Contains("employee"))
         {
             drdEmployee.ClearSelection();
             drdEmployee_SelectionChanged(null, null);
         }
         else if (imgButton.ID.Contains("requisition"))
         {
             drdRequisitions.ClearSelection();
             drdRequisitions_SelectionChanged(null, null);
         }
         else if (imgButton.ID.Contains("items"))
         {
             drdItems.ClearSelection();
             drdItems_SelectionChanged(null, null);
         }
     }
 }
Пример #23
0
 protected void btnOk_Click(object sender, ImageClickEventArgs e)
 {
     Model.User sessionUser = Session["User"] as Model.User;
     Model.User u = new Model.User() { UserName = sessionUser.UserName , UserPassword = txtOldPwd.Text};
     if (String.IsNullOrEmpty(u.UserName) || String.IsNullOrEmpty(u.UserPassword) || !cvPwd.IsValid)
     {
         return;
     }
     u.UserPassword = Common.SecurityHelper.Encrypt(u.UserPassword);
     if (!sessionUser.UserPassword.Equals(u.UserPassword))
     {
         Response.Write("<script>alert('密码修改失败!原密码有误')</script>");
         return;
     }
     BLL.UserBLL helper = new BLL.UserBLL();
     u.UserPassword = Common.SecurityHelper.Encrypt(txtPwd.Text);
     if (helper.Update(u))
     {
         Session.Abandon();
         Response.Write("<script>alert('密码修改成功!请重新登录~~');location.href='/Admin/login.html'</script>");
     }
     else
     {
         Response.Write("<script>alert('密码修改失败!请稍后重试')</script>");
     }
 }
Пример #24
0
        protected void ViewAllAdImageButton_Click(object sender, ImageClickEventArgs e)
        {
            dsdetails.SelectCommand = "SELECT AdList.Id, AdList.ImageUrl, AdList.Impressions, AdList.StartDate, AdList.EndDate, AdList.IsActive, AdTotalStats.TotalImpression, AdTotalStats.TotalClick FROM AdList " +
                   "INNER JOIN AdTotalStats ON AdList.Id = AdTotalStats.id ";

            gvdetails.DataBind();
        }
Пример #25
0
        protected void btnSalvar_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                var validar = Validar();

                if (!validar.Any())
                {
                    TB_REPASSE repasse = new TB_REPASSE();

                    repasse.COD_CONCESSIONARIA = short.Parse(ddlConcessionaria.SelectedValue);
                    repasse.COD_EMPRESA = short.Parse(ddlEmpresa.SelectedValue);
                    repasse.COD_BANCO = short.Parse(ddlBanco.SelectedValue);
                    repasse.VLR_REPASSE = int.Parse(txtValor.Text.Replace(".", "").Replace(",", ""));
                    repasse.DTA_REPASSE = CRB.BOSS.Funcoes.Geral.FormatDateOracleSimples(Convert.ToDateTime(txtDataInicial.Text));
                    repasse.IDT_EXTRATO_IMP = "N";
                    repasse.STA_REPASSE = "P";

                    CRB.BOSS.Financeiro.Repasse.Repasse.Salvar(repasse);

                    CRB.BOSS.UI.Controle.Popup.Mensagem.Formulario("Repasse salvo com sucesso", "location.href = 'Lista.aspx';");
                }
                else
                {
                    CRB.BOSS.UI.Controle.Popup.Mensagem.Alerta(validar);
                }
            }
            catch(Exception ex)
            {
                CRB.BOSS.UI.Controle.Popup.Mensagem.Formulario(ex);
            }
        }
Пример #26
0
        protected void ibAdd_Click(object sender, ImageClickEventArgs e)
        {
            GridViewRow gvr = ((GridViewRow)(((ImageButton)(sender)).NamingContainer));
            string name = ((TextBox)gvr.FindControl("txtName")).Text;
            District fd = new District();

            fd.DistrictName = name;

            try
            {
                dMethods.Add(fd);
                BindGrid();
                js.ShowAlert(this, "District created succesfully!");
            }
            catch (Exception ex)
            {
                if (ex.InnerException.InnerException.Message.Contains("UNIQUE"))
                {
                    js.ShowAlert(this, "District already exists! Please try another name.");
                }
                else
                {
                    js.ShowAlert(this, ex.Message);
                }
            }
        }
Пример #27
0
        protected void btn_deletepic_Click(object sender, ImageClickEventArgs e)
        {
            string picurl = string.Empty;
                ImageButton button = (ImageButton)sender;
                GridViewRow row = (GridViewRow)button.Parent.Parent;
                picurl = row.Cells[3].Text.ToString();
                string FilePath = Server.MapPath("pic/") + picurl;
                try
                {
                    File.Delete(FilePath);
                    string commandString = String.Format("delete from  t_image where   urlname='{0}' ", picurl);
                    string result = dbkit.insertandUpdate(commandString);
                    if (result.Split('@')[0] == "true")
                    {
                        getinfo();
                        clearinfo();

                        dbkit.Show(this, "删除成功");
                        getpicinfo();
                    }
                    else
                    {

                        dbkit.Show(this, "删除失败");
                    }
                }
                catch (Exception ee)
                {
                    string aaaaaaaaa = ee.Message;
                }
        }
 protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
 {
     if (Request.QueryString["mid"] != null)
     {
         Response.Redirect("~//topcare/admin//SubscriptionFeePayments.aspx?mid=" + Request.QueryString["mid"]);
     }
 }
Пример #29
0
 protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
 {
     this.PlaceHolder1.Visible = true;
     this.PlaceHolder2.Visible = false;
     this.PlaceHolder3.Visible = false;
     Label1.Text = "Tìm Kiếm Sinh Viên";
 }
        protected void btnDelete1_Click(object sender, ImageClickEventArgs e)
        {
            string strLink = "";
            try
            {
                var n_info = DB.GetTable<ESHOP_BANNER>().Where(n => n.BANNER_ID == m_banner_id);

                if (n_info.ToList().Count > 0)
                {
                    if (!string.IsNullOrEmpty(n_info.ToList()[0].BANNER_FILE))
                    {
                        string imagePath = Server.MapPath(PathFiles.GetPathBanner(m_banner_id) + n_info.ToList()[0].BANNER_FILE);
                        n_info.ToList()[0].BANNER_FILE = "";
                        DB.SubmitChanges();

                        if (File.Exists(imagePath))
                            File.Delete(imagePath);

                        strLink = "config_banner.aspx?banner_id=" + m_banner_id;
                    }
                }
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
            finally
            {
                if (!string.IsNullOrEmpty(strLink))
                    Response.Redirect(strLink);
            }
        }
Пример #31
0
        protected void lnkPrint_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            try
            {
                ImageButton lnkPrint = (ImageButton)sender;
                GridViewRow row      = (GridViewRow)lnkPrint.NamingContainer;
                if ((row.Cells[5].Text == "SGST") || (row.Cells[5].Text == "IGST"))
                {
                    //  Response.Write("<script type='text/javascript'>detailedresults=window.open('" + MABL.AppVariable.Project_Constant("RptBrowse") + "/ReportBrowser/GSTInvBrowser.aspx?InvoiceType=" + row.Cells[5].Text + "&INVID=" + row.Cells[0].Text + "');</script>");
                }
                else
                {
                    DisplayCustomMessageSummary("Invalid Invoice Type");
                }

                //  MABL.AppVariable.PrintDosReport_Invoice(row.Cells[0].Text);
            }
            catch (Exception ex)
            {
                DisplayCustomMessageSummary(ex.Message);
            }
        }
Пример #32
0
        protected void btnNew_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            ContentBlock b = MyPage.MTApp.ContentServices.Columns.FindBlock(this.BlockId);

            //Inserting
            //SettingsManager.GetSettingList("Products");
            foreach (string product in ProductPicker1.SelectedProducts)
            {
                ContentBlockSettingListItem c = new ContentBlockSettingListItem();
                Product p = MyPage.MTApp.CatalogServices.Products.Find(product);
                c.Setting1 = product;
                //c.Setting2 = p.Sku;
                //c.Setting3 = p.ProductName;
                //c.Setting4 = Page.ResolveUrl(ImageHelper.GetValidImage(p.ImageFileSmall, true));
                //c.Setting5 = UrlRewriter.BuildUrlForProduct(p, this.Page);
                //c.Setting6 = p.ImageFileSmallAlternateText;
                c.ListName = "Products";
                b.Lists.AddItem(c);
                MyPage.MTApp.ContentServices.Columns.UpdateBlock(b);
            }
            LoadItems(b);
        }
Пример #33
0
        protected void btnSubmit_onClick(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            if (ValidateCollectionName(this.newCollectionName.Value))
            {
                this.colNameError.Text = "";
                SpecimenCollection collection = new SpecimenCollection();
                collection[SpecimenCollection.CollectionName]       = this.newCollectionName.Value;
                collection[SpecimenCollection.CollectionStatus]     = "Available";             //bug fix
                collection[SpecimenCollection.CollectionAssignDate] = DateTime.Now.ToString(); //enhancement
                collection.Save();
                AddSpecimensToCollection(int.Parse(collection[SpecimenCollection.CollectionId].ToString()), Request.QueryString["specimenIds"], true);

                this.collectionNamePage.Visible    = false;
                this.collectionDetailsPage.Visible = true;

                this.pageTitle.Text = "Added  <span style=\"color:#00668d;\">" + this.numOfSpecimensAdded.ToString() + " Specimen(s)</span> to New Collection";
            }
            else
            {
                this.colNameError.Text = "Name is already in use. &nbsp;Please try again.";
            }
        }
Пример #34
0
        private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            if (CheckBox1.Checked)
            {
                string[] amministrazione       = ((string)Session["AMMDATASET"]).Split('@');
                string   codiceAmministrazione = amministrazione[0];

                ((SAAdminTool.DocsPaWR.Templates)Session["templateSelPerModelli"]).PATH_MODELLO_1 = "";
                DocsPaWR.Templates template = (SAAdminTool.DocsPaWR.Templates)Session["templateSelPerModelli"];
                ProfilazioneDocManager.eliminaModelli(template.DESCRIZIONE, codiceAmministrazione, "Modello1.rtf", "doc", (SAAdminTool.DocsPaWR.Templates)Session["templateSelPerModelli"], this);

                // Se è attivo M/Text viene visualizzata la modalità Classica per il modello principale
                if (MTextUtils.IsActiveMTextIntegration())
                {
                    this.ddlModelTypeMain.SelectedIndex = 0;
                    this.pnlModelTypeMain.Visible       = false;
                    this.uploadPathUno.Visible          = true;
                }

                CheckBox1.Checked = false;
            }
        }
Пример #35
0
        protected void buscar_paciente(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            ImageButton btndetails = sender as ImageButton;
            GridViewRow row        = (GridViewRow)btndetails.NamingContainer;


            Session["_Num_cama"]     = row.Cells[1].Text.Trim();
            Session["_Nom_paciente"] = row.Cells[2].Text.Trim().Replace("&nbsp;", "");

            Session["_Cod_paciente"] = grillacama.DataKeys[row.RowIndex]["_Cod_paciente"].ToString().Replace("&nbsp;", "");
            cod_paciente             = grillacama.DataKeys[row.RowIndex]["_Cod_paciente"].ToString().Replace("&nbsp;", "");
            Session["_Cod_cama"]     = grillacama.DataKeys[row.RowIndex]["_Cod_cama"].ToString().Replace("&nbsp;", "");
            cod_cama = grillacama.DataKeys[row.RowIndex]["_Cod_cama"].ToString().Replace("&nbsp;", "");



            string res = "Estimado Usuario, que acciòn desea realizar en la cama seleccionada";

            ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup2('" + res + "');", true);

            //  Response.Redirect("Buscar_Pacientes.aspx");
        }
Пример #36
0
        protected void btnPrin_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            crReportDocument = new ReportDocument();
            crReportDocument = (ReportDocument)Session["RDService"];
            string FilePath = Server.MapPath("~") + "Download\\";
            string FileName = Request.QueryString["ReportID"] + this.Session["DealerCode"].ToString() + DateTime.Now.ToString("ddMMyyyy") + ".pdf";
            string File     = FilePath + FileName;

            //crReportDocument.SetDatabaseLogon("SDMS", "sdms161", "192.168.1.47", "SDMS");
            //crReportDocument.SetDatabaseLogon("sa", "100372", "AZHARDELL", "BMS",true);

            crReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, File);
            crReportDocument.Dispose();
            string URL;

            URL = "../../../../Download/OpenPdf.aspx?FileName=" + FileName;

            string fullURL = "window.open('" + URL + "', '_blank', 'height=800,width=1000,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,titlebar=no');";

            ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", fullURL, true);



            //crReportDocument = new ReportDocument();
            //crReportDocument = (ReportDocument)Session["RDService"];
            //crReportDocument.SetDatabaseLogon("SDMS", "sdms161");
            //string FilePath = Server.MapPath("~") + "\\Download\\";
            //string FileName = Request.QueryString["ReportID"] + SessionInformation.DealerCode + DateTime.Now.ToString("dd-MM-yyyy") + ".pdf";
            //string File = FilePath + FileName;
            //crReportDocument.SetDatabaseLogon("SDMS", "sdms161", "192.168.1.47", "SDMS");
            //crReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, File);

            //string URL;
            //URL = "../../../Download/OpenPdf.aspx?FileName=" + FileName;
            ////URL = FilePath + "OpenPdf.aspx?FileName=" + FileName;

            //string fullURL = "window.open('" + URL + "', '_blank', 'height=800,width=1000,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,titlebar=no');";
            //ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", fullURL, true);
        }
Пример #37
0
        protected void btnSave_onClick(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            if (ValidateCollectionName(this.CollectionName.Value))
            {
                SpecimenCollection collection = new SpecimenCollection();
                CICHelper.SetBOValues(Page.Controls, collection, 1);

                //DataTable dt = new DataTable();
                //dt = collection.GetTable();

                collection[SpecimenCollection.EnteredBy]   = this.EnteredBy.Text;
                collection[SpecimenCollection.EnteredTime] = this.EnteredTime.Text;

                SecurityController sc   = new SecurityController();
                string             user = sc.GetUserName();
                collection[SpecimenCollection.UpdatedBy]   = user;
                collection[SpecimenCollection.UpdatedTime] = DateTime.Now.ToString();

                collection[SpecimenCollection.LockedBy]   = this.LockedBy.Text;
                collection[SpecimenCollection.LockedTime] = this.LockedTime.Text;

                collection.Save();

                //dt = new DataTable();
                //dt = collection.GetTable();
                //this.CollectionId.Text = dt.Rows[0][SpecimenCollection.CollectionId].ToString();
                this.CollectionId.Text = collection[SpecimenCollection.CollectionId].ToString();

                LoadAuditData(collection);
                this.errorMessage.Text = "";
            }
            else
            {
                //collection name in use already; don't save
                this.errorMessage.Text = "Name is already in use. &nbsp;Please try again.";
            }

            ShowHideSpecimenGrid();
        }
Пример #38
0
        //*******************************************************
        //
        // The LoginBtn_Click event is used on this page to
        // authenticate a customer's supplied username/password
        // credentials against a database.
        //
        // If the supplied username/password are valid, then
        // the event handler adds a cookie to the client
        // (so that we can personalize the home page's welcome
        // message), migrates any items stored in the user's
        // temporary (non-persistent) shopping cart to their
        // permanent customer account, and then redirects the browser
        // back to the originating page.
        //
        //*******************************************************

        private void LoginBtn_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            // Only attempt a login if all form fields on the page are valid
            if (Page.IsValid == true)
            {
                // Save old ShoppingCartID
                IBuySpy.ShoppingCartDB shoppingCart = new IBuySpy.ShoppingCartDB();
                String tempCartID = shoppingCart.GetShoppingCartId();

                // Attempt to Validate User Credentials using CustomersDB
                IBuySpy.CustomersDB accountSystem = new IBuySpy.CustomersDB();
                String customerId = accountSystem.Login(email.Text, password.Text);

                if (customerId != null)
                {
                    // Migrate any existing shopping cart items into the permanent shopping cart
                    shoppingCart.MigrateCart(tempCartID, customerId);

                    // Lookup the customer's full account details
                    IBuySpy.CustomerDetails customerDetails = accountSystem.GetCustomerDetails(customerId);

                    // Store the user's fullname in a cookie for personalization purposes
                    Response.Cookies["IBuySpy_FullName"].Value = customerDetails.FullName;

                    // Make the cookie persistent only if the user selects "persistent" login checkbox
                    if (RememberLogin.Checked == true)
                    {
                        Response.Cookies["IBuySpy_FullName"].Expires = DateTime.Now.AddMonths(1);
                    }

                    // Redirect browser back to originating page
                    FormsAuthentication.RedirectFromLoginPage(customerId, RememberLogin.Checked);
                }
                else
                {
                    Message.Text = "Login Failed!";
                }
            }
        }
        protected void imgExportToExcel_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            Utility   objUtil = new Utility();
            DataTable dt      = new DataTable();

            dt = Session[clsConstant.SESS_TABLE] as DataTable;
            Excel          excel    = new Excel();
            ArrayList      list     = new ArrayList();
            clsExcelObject objExcel = null;

            string[] header = new string[]
            {
                "vsTopic",
                "Sector",
                "dtFromDate",
                "dtToDate",
                "vsVenue",
                "vsTargetAudienceName",
                "vsInviteType",
                "iSeats",
                "vsName",
                "dtLastDate",
                "vsFile"
            };
            string[] datacolumn = new string[grdNominationManagementSystem.Columns.Count - 2];
            int      counter    = 0;

            for (int i = 1; i <= header.Length + 1; i++)
            {
                if (grdNominationManagementSystem.Columns[i].Visible != false)
                {
                    objExcel = new clsExcelObject(header[counter], grdNominationManagementSystem.Columns[i].HeaderText.Replace("<br />", ""));

                    list.Add(objExcel);
                    counter++;
                }
            }
            excel.ExportToExcel(dt, "Nomination Details", list);
        }
Пример #40
0
        //*******************************************************
        //
        // The SubmitBtn_Click event handle is used to order the
        // items within the current shopping cart.  It then
        // displays the orderid and order status to the screen
        // (hiding the "SubmitBtn" button to ensure that the
        // user can't click it twice).
        //
        //*******************************************************

        private void SubmitBtn_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            IBuySpy.ShoppingCartDB cart = new IBuySpy.ShoppingCartDB();

            // Calculate end-user's shopping cart ID
            String cartId = cart.GetShoppingCartId();

            // Calculate end-user's customerID
            String customerId = User.Identity.Name;

            if ((cartId != null) && (customerId != null))
            {
                // Place the order
                IBuySpy.OrdersDB ordersDatabase = new IBuySpy.OrdersDB();
                int orderId = ordersDatabase.PlaceOrder(customerId, cartId);

                //Update labels to reflect the fact that the order has taken place
                Header.Text       = "Check Out Complete!";
                Message.Text      = "<b>Your Order Number Is: </b>" + orderId;
                SubmitBtn.Visible = false;
            }
        }
Пример #41
0
        private void btn_deleteADL_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            for (int i = 0; i < m_hashTableFascicoli.Count; i++)
            {
                DocumentManager.eliminaDaAreaLavoro(this, null, (DocsPAWA.DocsPaWR.Fascicolo)m_hashTableFascicoli[i]);
            }
            m_hashTableFascicoli.Clear();

            m_dataTableFascicoli.Clear();

            FascicoliManager.removeDatagridFascicolo(this);

            FascicoliManager.removeHashFascicoli(this);

            DataGrid1.Visible          = false;
            lbl_message.Text           = "Nessun fascicolo presente in ADL!";
            this.btn_elimina.Visible   = false;
            pnl_ADL.Visible            = false;
            this.btn_elimina.Visible   = false;
            this.lbl_message2.Visible  = false;
            this.btn_deleteADL.Visible = false;
        }
Пример #42
0
 private void imgSaveOnly_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     if (saveData())
     {
         if (ViewState["mode"].ToString().ToLower().Equals("add"))
         {
             txtitem_code.Text          = string.Empty;
             txtitem_name.Text          = string.Empty;
             cboItem_type.SelectedIndex = 0;
             InitcboLot();
             txtitem_name.Focus();
             string strScript1 = "RefreshMain('" + ViewState["page"].ToString() + "');";
             ScriptManager.RegisterStartupScript(Page, Page.GetType(), "OpenPage", strScript1, true);
         }
         else if (ViewState["mode"].ToString().ToLower().Equals("edit"))
         {
             string strScript1 = "ClosePopUpListPost('" + ViewState["page"].ToString() + "','1');";
             ScriptManager.RegisterStartupScript(Page, Page.GetType(), "OpenPage", strScript1, true);
         }
         MsgBox("บันทึกข้อมูลสมบูรณ์");
     }
 }
        protected void ibtnAddToList_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            string      eventOrderNumbers = string.Empty;
            ImageButton ibtnAddToList     = (ImageButton)sender;
            bool        addedToList       = ibtnAddToList.ImageUrl.Contains("on-my-list");
            string      orderNumber       = ibtnAddToList.CommandArgument;

            //Check if list is in Cookies
            if (Request.Cookies["EventOrderNumbers"] != null)
            {
                eventOrderNumbers = Request.Cookies["EventOrderNumbers"].Value;
                addedToList       = eventOrderNumbers.Contains(orderNumber);

                //Add to string chain (validate if not in it already)
                if (!addedToList)
                {
                    eventOrderNumbers += orderNumber + "|";
                }
                else
                {
                    //Remove from list if already in it
                    eventOrderNumbers = eventOrderNumbers.Replace(orderNumber + "|", "");
                }
            }
            else
            {
                eventOrderNumbers += orderNumber + "|";
            }

            //Add string chain to Cookie
            EventOrderNumbers = eventOrderNumbers;
            Response.Cookies["EventOrderNumbers"].Value   = eventOrderNumbers;
            Response.Cookies["EventOrderNumbers"].Expires = DateTime.Now.AddDays(90);

            //Change ImageButton image to "on my list"
            ibtnAddToList.ImageUrl = addedToList ? "~/assets/images/add-to-list.png" : "~/assets/images/on-my-list.png";
            //Load EventList usercontrol
            LoadEventList();
        }
Пример #44
0
        protected void BtnAdd_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            bool IsIn = this.NameIsIn();

            if (t_PassWd.Value.Trim().Length == 0)
            {
                baseOperation.ShowErrorMessage(this.Page, "密码不能为空!");
            }
            else if (t_PassWd.Value.Trim().Length < 6)
            {
                baseOperation.ShowErrorMessage(this.Page, "密码长度不能小于6位!");
            }
            else if (IsIn == true)
            {
                baseOperation.ShowErrorMessage(this.Page, "用户姓名重复!");
            }
            else
            {
                string newPW = baseOperation.newPW(t_PassWd.Value.Trim(), "MD5");


                this.StaffCode = baseOperation.InserStaffInfo(t_StaffCaption.Value.Trim(), newPW, t_Remark.Value.Trim(), ddl_usertype.SelectedItem.Value);



                //如果所属角色不为空,则进行添加用户角色操作,只添加一个!
                if (ddlActorList.SelectedItem.Value.Length > 0)
                {
                    baseOperation.InsertActorByStaff(this.StaffCode, ddlActorList.SelectedItem.Value);
                }

                string url;
                url = "Success.aspx?backUrl=AddUser.aspx&erorMessage=编号为:" + this.StaffCode + "的用户成功新增!";
                Log.WriteLog("", Session["username"] + ":增加用户" + StaffCode);
                Response.Redirect(url);

                //				ClearText();
            }
        }
Пример #45
0
        protected void imgBtnExportToExcel_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            try
            {
                Utility   objUtil = new Utility();
                DataTable dt      = new DataTable();
                dt = Session[clsConstant.SESS_TABLE] as DataTable;
                Excel          excel    = new Excel();
                ArrayList      list     = new ArrayList();
                clsExcelObject objExcel = null;

                string[] header = new string[]
                {
                    "iDocSendID",
                    "vsFileTrackID",
                    "vsDocTypeName",
                    "vsDocName",
                    "vsDocCatName",
                    "vsLoanNumber",
                    "iTANumber",
                    "NAME",
                    "dtDueDate",
                    "LapsedDays",
                    "dtCreateDate"
                };
                string[] datacolumn = new string[grdDocReceived.Columns.Count - 4];
                for (int i = 3; i < header.Length + 3; i++)
                {
                    objExcel = new clsExcelObject(header[i - 3], grdDocReceived.Columns[i].HeaderText.Replace("<br />", ""));
                    list.Add(objExcel);
                }
                excel.ExportToExcel(dt, "DocumentReceived", list);
            }
            catch (Exception ex)
            {
                logger.Error(ex);
            }
        }
Пример #46
0
        private void ibtnAgregar_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            dgdRoles.EditItemIndex = -1;
            EnlazarGridRoles();

            Page.Validate();

            if (!Page.IsValid)
            {
                return;
            }

            ESRol Rol = new ESRol(txtRolInsertar.Text, txtDescripcionInsertar.Text);

            if (Rol.Guardar() > 0)
            {
                if (intRoles % dgdRoles.PageSize == 0)
                {
                    dgdRoles.CurrentPageIndex = dgdRoles.PageCount;
                }
                else
                {
                    dgdRoles.CurrentPageIndex = dgdRoles.PageCount - 1;
                }

                ESLog.Log(intEmpleado, Session["Host"].ToString(), ESLog.TipoLog.Informativo, ESLog.TipoTransaccion.Insertar, "ESSEP003A", 8, "", txtRolInsertar.Text);

                strOrdenar = "";
                EnlazarGridRoles();
            }
            else
            {
                lblError.Text = "Error";
                return;
            }

            LimpiarInsertar();
        }
Пример #47
0
    private void btAddRow_Click(object sender, System.Web.UI.ImageClickEventArgs e)
    {
        lbError.Visible = false;
        if (txtValue.Text.Length > 0)
        {
            //QC2691 Check for validation of Terms if it already exists was not there so added
            TermList    Termdetails = Term.GetAll("TermValue = '" + txtValue.Text + "' AND TermTypeCode='C'");
            LookupValue lgValuesObj;
            if (Termdetails == null || Termdetails.Count == 0) //#2712
            //if (Termdetails == null) //#2712 Commented
            {
                lgValuesObj = new LookupValue(-1, lookupGroupId, 0, txtValue.Text, txtComment.Text, IsTranslateDefaultOption);
            }
            else
            {
                lgValuesObj = new LookupValue(-1, lookupGroupId, 0, txtValue.Text, txtComment.Text, Termdetails[0].IsTranslatable);
            }

            if (!lgValuesObj.Save(SessionState.User.Id))
            {
                lbError.CssClass = "hc_error";
                lbError.Text     = LookupValue.LastError;
                lbError.Visible  = true;
            }
            else
            {
                txtComment.Text = string.Empty;
                txtValue.Text   = string.Empty;
                UpdateDataView();
            }
        }
        else
        {
            lbError.CssClass = "hc_error";
            lbError.Text     = "Value cannot be empty";
            lbError.Visible  = true;
        }
    }
Пример #48
0
        protected void btnImprimir_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            this.ActualizarConsignatario();

            try
            {
                Rendizador loRendizador = new Rendizador();
                Informe    loInforme    = new Informe()
                {
                    Ancho        = 21.6,
                    Alto         = 13.9,
                    Copias       = int.Parse(txtCopias.Text),
                    Extension    = "rdl",
                    Formato      = Informes.Comun.Definiciones.TipoFormato.EMF,
                    Nombre       = "EtiquetaBlanca",
                    Salida       = Informes.Comun.Definiciones.TipoSalida.Impresion,
                    Tipo         = Informes.Comun.Definiciones.TipoInforme.Web,
                    Ubicacion    = Server.MapPath("~/Guias/"),
                    UnidadMedida = Informes.Comun.Definiciones.TipoUnidaMedida.Centimetros
                };
                DataSet loFuenteDatos = new DataSet();

                loFuenteDatos.Tables.Add((DataTable)ViewState["Consignatario"]);
                loFuenteDatos.Tables[0].TableName = "dsConsignatario";
                loFuenteDatos.Tables.Add((DataTable)ViewState["Remitente"]);
                loFuenteDatos.Tables[1].TableName = "dsRemitente";
                loRendizador.Presentar(loInforme, loFuenteDatos);
            }
            catch (Exception ex)
            {
                Session["Excepcion"] = ex;
                Response.Redirect("~/Error.aspx", false);
            }
            finally
            {
                txtClienteID.Focus();
            }
        }
        protected void btnSave_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            Variant item = MTApp.CatalogServices.ProductVariants.Find(this.dialogbvin.Value);

            if ((item != null))
            {
                item.Sku = this.dialogsku.Text.Trim();
                decimal p = item.Price;
                if ((decimal.TryParse(this.dialogprice.Text.Trim(), out p)))
                {
                    item.Price = p;
                }

                if (this.dialognewFile.HasFile)
                {
                    MerchantTribe.Commerce.Storage.DiskStorage.UploadProductVariantImage(this.MTApp.CurrentStore.Id, this.productBvin, item.Bvin, this.dialognewFile.PostedFile);
                }
                MTApp.CatalogServices.ProductVariants.Update(item);
            }


            Response.Redirect("ProductChoices_Variants.aspx?id=" + productBvin);
        }
Пример #50
0
 protected void btnExportToexcel_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     try
     {
         dt = new DataTable();
         dt = Session[clsConstant.SESS_TABLE] as DataTable;
         Excel          excel      = new Excel();
         ArrayList      list       = new ArrayList();
         clsExcelObject objExcel   = null;
         string[]       datacolumn = new string[1];
         string[]       header     = new string[] { "vsDocTypeName" };
         for (int i = 1; i < 2; i++)
         {
             objExcel = new clsExcelObject(header[i - 1], gridDocTypeDetailsList.Columns[i].HeaderText.Replace("<br />", ""));
             list.Add(objExcel);
         }
         excel.ExportToExcel(dt, "Document Type Details", list);
     }
     catch (Exception ex)
     {
         logger.Error(ex);
     }
 }
Пример #51
0
        protected void AddButtonClick(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            if (!Request.Form["Group"].Equals("") && !Request.Form["Group"].Equals(""))
            {
                int datasetId = int.Parse(Request.Form["SelectDatasetName"]);
                int groupId   = int.Parse(Request.Form["Group"]);

                if (ValidateDatasetGroup())
                {
                    GroupDataset biz = new GroupDataset();
                    biz[GroupDataset.DatasetId] = datasetId;
                    biz[GroupDataset.GroupId]   = groupId;
                    biz.Save();
                }

                this.ShowGroupSelect(datasetId);
                //this.Page_Load(sender, (System.EventArgs)e);
            }
            else
            {
                valMsg.Text = "You must select a dataset and group.";
            }
        }
Пример #52
0
        private void deleteFile_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            string FilePath = "";

            if (FilePathName != "")
            {
                FilePath = HttpContext.Current.Server.MapPath(UpFilePath + FilePathName);
                if (File.Exists(FilePath))
                {
                    File.Delete(FilePath);
                    FilePathName = "";
                }
                else
                {
                    filename.Text = "";
                    this.Text     = "";
                    return;
                }
//				{
//					HttpContext.Current.Response.Write("<script language=jscript>alert('该文件不存在! 未能成功删除!');</script>");
//				}
            }
        }
Пример #53
0
        protected void AddButtonClick(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            if (!Request.Form["UserGroup"].Equals("") && !Request.Form["UserGroup"].Equals(""))
            {
                int userId  = int.Parse(Request.Form["SelectUserName"]);
                int groupId = int.Parse(Request.Form["UserGroup"]);

                if (ValidateUserGroup())
                {
                    Caisis.BOL.UserGroup biz = new Caisis.BOL.UserGroup();
                    biz[Caisis.BOL.UserGroup.UserId]  = userId;
                    biz[Caisis.BOL.UserGroup.GroupId] = groupId;
                    biz.Save();
                }

                this.ShowGroupSelect(userId);
                //this.Page_Load(sender, (System.EventArgs)e);
            }
            else
            {
                valMsg.Text = "You must select a user name and group.";
            }
        }
Пример #54
0
 private void btn_ricerca_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     try
     {
         if (rb_opzioni.SelectedIndex == -1)
         {
             Response.Write("<script>alert('Attenzione selezionare un\\' opzione di ricerca.')</script>");
             return;
         }
         if (rb_opzioni.SelectedIndex == 0)
         {
             string url = "";
             url = "TabListaFasc.aspx?tipoR=T";
             string funct_dx2 = "top.principale.frames[1].location='" + url + "'";
             this.Page.Response.Write("<script> " + funct_dx2 + "</script>");
         }
         if (rb_opzioni.SelectedIndex == 1)
         {
             //Verifica che siano stati inseriti tutti i campi obbligatori
             if (string.IsNullOrEmpty(this.txt_codice.Text))
             {
                 Response.Write("<script>alert('Attenzione selezionare un fascicolo.')</script>");
                 return;
             }
             else
             {
                 string url       = "TabListaFasc.aspx?tipoR=C";
                 string funct_dx2 = "top.principale.frames[1].location='" + url + "'";
                 this.Page.Response.Write("<script> " + funct_dx2 + "</script>");
             }
         }
     }
     catch (Exception ex)
     {
         DocsPAWA.ErrorManager.redirectToErrorPage(this, ex);
     }
 }
Пример #55
0
        private void btn_nuova_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            if (((System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txt_confirmMod")).Value == "")
            {
                Session.Remove("selCorrDaRubrica");
                btn_salva.Visible          = true;
                Panel3.Visible             = true;
                dg_1.SelectedIndex         = -1;
                dg_2.SelectedIndex         = -1;
                dg_1.CurrentPageIndex      = 0;
                dg_2.CurrentPageIndex      = 0;
                txt_descrizione.Text       = "";
                txt_descrizione.Visible    = true;
                txt_nomeLista.Text         = "";
                txt_nomeLista.Visible      = true;
                txt_nomeLista.ReadOnly     = false;
                txt_nomeLista.BackColor    = System.Drawing.Color.White;
                txt_codiceCorr.Text        = "";
                txt_codiceCorr.Visible     = true;
                txt_codiceLista.Text       = "";
                txt_codiceLista.Enabled    = true;
                Label2.Visible             = true;
                Label3.Visible             = true;
                imgBtn_descrizione.Visible = true;
                imgBtn_addCorr.Visible     = true;

                Panel1.Visible = true;
                Panel2.Visible = true;

                ((DataSet)ViewState["dsCorr"]).Tables[0].Rows.Clear();
                dg_2.DataSource = ((DataSet)ViewState["dsCorr"]);
                dg_2.DataBind();
                dg_2.Visible = true;

                SetFocus(txt_codiceLista);
            }
        }
Пример #56
0
        private void PagerButtonClick(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            //获得LinkButton的参数值
            String arg = ((ImageButton)sender).CommandArgument;

            switch (arg)
            {
            case ("next"):
                if (StaffList.CurrentPageIndex < (StaffList.PageCount - 1))
                {
                    StaffList.CurrentPageIndex++;
                }
                break;

            case ("pre"):
                if (StaffList.CurrentPageIndex > 0)
                {
                    StaffList.CurrentPageIndex--;
                }
                break;

            case ("first"):
                StaffList.CurrentPageIndex = 0;
                break;

            case ("last"):
                StaffList.CurrentPageIndex = (StaffList.PageCount - 1);
                break;

            default:
                //本页值
                StaffList.CurrentPageIndex = Convert.ToInt32(arg);
                break;
            }
            BindGrid();
        }
Пример #57
0
        /*
         * //그래프그리기(공통으로 뽑음--장기적으로 이상없으면 지움)
         * private System.Web.UI.WebControls.Image DrawGraph(int point)
         * {
         *      System.Web.UI.WebControls.Image imgCntGraph;
         *      double widthPercent = 0;
         *      if(this.pollSum > 0)
         *              widthPercent = Math.Round(MathLib.GetPercent(point, this.pollSum), 1);
         *
         *      imgCntGraph = new System.Web.UI.WebControls.Image();
         *      imgCntGraph.ImageUrl = @"/CommonApps/MemberPoll/Images/green.gif";
         *      imgCntGraph.Width = Unit.Percentage(widthPercent * 1.4);
         *      imgCntGraph.Height = 10;
         *      imgCntGraph.AlternateText = Unit.Percentage(widthPercent).ToString();
         *      imgCntGraph.ImageAlign = ImageAlign.AbsMiddle;
         *      imgCntGraph.Visible = true;
         *      return imgCntGraph;
         * }
         */
        #endregion

        //투표
        private void btnVote_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            Page.Validate();
            if (!Page.IsValid)
            {
                ClientAction.ShowMsgBack("정확히 입력하세요.");
            }

            dbUtil = new DBLib();
            string whereClause = "poll_id =" + PostState.Self["poll_id"].ToString();

            whereClause += " AND exNbr =" + rblExamples.SelectedValue;

            if (dbUtil.ChangeFigure("t_PollEX", "pPoint", 1, whereClause) > 0)
            {
                Cookie.Self.SetCookie("voted", PostState.Self["poll_id"].ToString(), 1);
                Cookie.Self.SetCookie("votedDay", System.DateTime.Today.ToString(), 1);
                ClientAction.ShowMsgAndGoUrl("[" + rblExamples.SelectedValue + "." + rblExamples.SelectedItem.Text + "] 에 투표하였습니다.", Request.Url.ToString());
            }
            else
            {
                ClientAction.ShowInfoMsg("에러!!");
            }
        }
Пример #58
0
    protected void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e)
    {
        if (Session["company_id"] != null)
        {
            company_id = Convert.ToInt32(Session["company_id"].ToString());
        }
        ImageButton img     = (ImageButton)sender;
        GridViewRow ROW     = (GridViewRow)img.NamingContainer;
        int         s_no    = Convert.ToInt32(ROW.Cells[0].Text);
        string      barcode = ROW.Cells[1].Text;
        float       qty     = float.Parse(ROW.Cells[6].Text);

        SqlConnection CON11 = new SqlConnection(ConfigurationManager.AppSettings["connection"]);
        SqlCommand    cmd11 = new SqlCommand("update product_stock set qty=qty+@qty where barcode='" + barcode + "' and Com_Id='" + company_id + "'", CON11);



        cmd11.Parameters.AddWithValue("@qty", qty);

        CON11.Open();
        cmd11.ExecuteNonQuery();
        CON11.Close();

        SqlConnection con1 = new SqlConnection(ConfigurationManager.AppSettings["connection"]);

        con1.Open();
        SqlCommand cmd1 = new SqlCommand("delete from sales_entry_details where s_no='" + s_no + "' and invoice_no='" + Label1.Text + "' and Com_Id='" + company_id + "'", con1);

        cmd1.ExecuteNonQuery();
        con1.Close();



        BindData();
        getinvoiceno1();
    }
        protected void btnNewChoice_Click(System.Object sender, System.Web.UI.ImageClickEventArgs e)
        {
            msg.ClearMessage();

            ProductProperty prop = new ProductProperty();

            prop = MTApp.CatalogServices.ProductProperties.Find((long)ViewState["ID"]);
            if (prop != null)
            {
                ProductPropertyChoice ppc = new ProductPropertyChoice();
                ppc.ChoiceName = this.NewChoiceField.Text.Trim();
                ppc.PropertyId = (long)ViewState["ID"];
                prop.Choices.Add(ppc);
                if (MTApp.CatalogServices.ProductProperties.Update(prop))
                {
                    PopulateMultipleChoice(prop);
                }
                else
                {
                    msg.ShowError("Couldn't add choice!");
                }
                this.NewChoiceField.Text = string.Empty;
            }
        }
Пример #60
0
 private void btn_Canc_Ric_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     if (ddl_Ric_Salvate.SelectedIndex > 0)
     {
         //Chiedi conferma su popup
         string id = ddl_Ric_Salvate.SelectedValue;
         DocsPaWR.DocsPaWebService docspaws = ProxyManager.getWS();
         DocsPaWR.SearchItem       item     = docspaws.RecuperaRicerca(Int32.Parse(id));
         DocsPaWR.Ruolo            ruolo    = null;
         if (item.owner_idGruppo != 0)
         {
             ruolo = (DocsPAWA.DocsPaWR.Ruolo)Session["userRuolo"];
         }
         string msg = "Il criterio di ricerca con nome '" + ddl_Ric_Salvate.SelectedItem.ToString() + "' verrà rimosso.\\n";
         msg += (ruolo != null) ? "Attenzione! Il criterio di ricerca è condiviso con il ruolo '" + ruolo.descrizione + "'.\\n" : "";
         msg += "Confermi l'operazione?";
         msg  = msg.Replace("\"", "\\\"");
         if (this.Session["itemUsedSearch"] != null)
         {
             Session.Remove("itemUsedSearch");
         }
         mb_ConfirmDelete.Confirm(msg);
     }
 }