Example #1
0
 protected void btnArchived_Click(object sender, System.EventArgs e)
 {
     using (SqlConnection sqlConnection = new SqlConnection(SqlHelper.ConnectionString))
     {
         sqlConnection.Open();
         SqlTransaction sqlTransaction = sqlConnection.BeginTransaction();
         try
         {
             foreach (GridViewRow gridViewRow in this.gvConract.Rows)
             {
                 CheckBox checkBox = gridViewRow.FindControl("cbBox") as CheckBox;
                 if (checkBox != null && checkBox.Checked)
                 {
                     Common2.ExecuteNoQuery(string.Concat(new object[]
                     {
                         "update Con_Incomet_Contract set IsArchived='true',FileTime='",
                         System.DateTime.Now,
                         "' where contractId='",
                         checkBox.ToolTip,
                         "'"
                     }));
                 }
             }
             base.RegisterScript("alert('系统提示:\\n\\n数据归档成功!');location='ContractArchived.aspx'");
             sqlTransaction.Commit();
             this.BindGv();
         }
         catch (System.Exception)
         {
             sqlTransaction.Rollback();
             base.RegisterScript("alert('系统提示:\\n\\n对不起归档失败!');");
         }
     }
 }
Example #2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrWhiteSpace(this.txtRTXID.Text))
     {
         string text = this.txtRTXID.Text;
         string sql  = string.Format("UPDATE PT_yhmc SET RTXID = '{0}' WHERE v_yhdm = '{1}'", text, base.UserCode);
         Common2.ExecuteNoQuery(sql);
         string message = "alert('系统提示:\\n\\n设置成功.');";
         base.RegisterScript(message);
     }
 }
Example #3
0
    protected void btnReturn_Click(object sender, System.EventArgs e)
    {
        string value = this.hfldPurchaseChecked.Value;

        System.Collections.Generic.List <string> listFromJson = JsonHelper.GetListFromJson(value);
        this.DelDirectory(listFromJson);
        if (listFromJson != null)
        {
            string arg_34_0 = this.fileInfoBll.GetModel(listFromJson[0]).ParentId;
            int    num      = Common2.ExecuteNoQuery("update F_FileInfo set IsValid='False'  where id in(" + StringUtility.GetArrayToInStr(listFromJson.ToArray()) + ")");
            if (num > 0)
            {
                base.RegisterScript("location.href='FileDirectory.aspx?id=" + this.tvFile.SelectedValue + "';alert('系统提示:\\n\\n 恢复成功!');");
            }
        }
    }
Example #4
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        string text = JsonHelper.Serialize(WEB_UserRole.userCodes.ToArray());

        Common2.ExecuteNoQuery(string.Concat(new string[]
        {
            "update ",
            this.tbName,
            " set ",
            this.field,
            " = '",
            text,
            "' where ",
            this.idName,
            " = '",
            this.id,
            "'"
        }));
        base.RegisterScript("window.close();");
    }
Example #5
0
    protected void SetLimit()
    {
        string value = this.hfldUserCodes.Value;
        string text  = "";

        if (value != "")
        {
            System.Collections.Generic.List <string> list = new System.Collections.Generic.List <string>(value.Split(new char[]
            {
                ','
            }));
            text = JsonHelper.Serialize(list.ToArray());
        }
        Common2.ExecuteNoQuery(string.Concat(new string[]
        {
            "UPDATE F_FileInfo SET UserCodes='",
            text,
            "' WHERE Id='",
            this.hfldPurchaseChecked.Value,
            "' "
        }));
        this.BindGv();
    }
Example #6
0
    protected void btnSave_Click(object sender, System.EventArgs e)
    {
        System.Collections.Generic.List <string> listFromJson = JsonHelper.GetListFromJson(this.hfldUserCodes.Value);
        string text = JsonHelper.Serialize(listFromJson.ToArray());

        string[] array = this.hdIds.Value.Split(new char[]
        {
            ','
        });
        for (int i = 0; i < array.Length; i++)
        {
            string text2 = array[i];
            Common2.ExecuteNoQuery(string.Concat(new string[]
            {
                "update ",
                this.tbName,
                " set ",
                this.field,
                " = '",
                text,
                "' where ",
                this.idName,
                " = '",
                text2,
                "'"
            }));
        }
        if (string.IsNullOrEmpty(this.btnId))
        {
            base.RegisterScript("alert('系统提示:\\n\\n更新成功!');window.opener.location = window.opener.location;window.close();");
            return;
        }
        System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
        stringBuilder.AppendFormat("window.opener.document.getElementById('{0}').click();", this.btnId).AppendLine();
        stringBuilder.Append("window.close();").AppendLine();
        base.RegisterScript(stringBuilder.ToString());
    }
Example #7
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        List <string> userCodes = this.GetUserCodes(this.hfldUserCodes.Value);

        if (this.ContractTypeId.Count > 1)
        {
            using (List <string> .Enumerator enumerator = this.ContractTypeId.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    string    current = enumerator.Current;
                    DataTable table   = Common2.GetTable(this.tbName, string.Concat(new string[]
                    {
                        " where ",
                        this.idName,
                        "='",
                        current,
                        "'"
                    }));
                    List <string> listFromJson = JsonHelper.GetListFromJson(table.Rows[0][this.field].ToString());
                    listFromJson.AddRange(userCodes.ToArray());
                    List <string> list = new List <string>();
                    foreach (string current2 in listFromJson)
                    {
                        if (!list.Contains(current2))
                        {
                            list.Add(current2);
                        }
                    }
                    string text = JsonHelper.Serialize(list.ToArray());
                    Common2.ExecuteNoQuery(string.Concat(new string[]
                    {
                        "update ",
                        this.tbName,
                        " set ",
                        this.field,
                        " = '",
                        text,
                        "' where ",
                        this.idName,
                        " = '",
                        current,
                        "'"
                    }));
                }
                goto IL_237;
            }
        }
        List <string> listFromJson2 = JsonHelper.GetListFromJson(this.hfldUserCodes.Value);
        string        text2         = JsonHelper.Serialize(listFromJson2.ToArray());

        Common2.ExecuteNoQuery(string.Concat(new string[]
        {
            "update ",
            this.tbName,
            " set ",
            this.field,
            " = '",
            text2,
            "' where ",
            this.idName,
            " = '",
            this.id,
            "'"
        }));
IL_237:
        base.RegisterScript("saveEvent();");
    }
Example #8
0
    protected void btnSave_Click(object sender, System.EventArgs e)
    {
        System.Collections.Generic.List <string> userCodes = this.GetUserCodes(this.hfldUserCodes.Value);
        if (this.listContractId.Count > 1)
        {
            using (System.Collections.Generic.List <string> .Enumerator enumerator = this.listContractId.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    string    current = enumerator.Current;
                    DataTable table   = Common2.GetTable(this.tbName, string.Concat(new string[]
                    {
                        " where ",
                        this.idName,
                        "='",
                        current,
                        "'"
                    }));
                    System.Collections.Generic.List <string> listFromJson = JsonHelper.GetListFromJson(table.Rows[0][this.field].ToString());
                    listFromJson.AddRange(userCodes.ToArray());
                    System.Collections.Generic.List <string> list = new System.Collections.Generic.List <string>();
                    string[] array = listFromJson.ToArray();
                    for (int i = 0; i < array.Length; i++)
                    {
                        string item = array[i];
                        if (!list.Contains(item))
                        {
                            list.Add(item);
                        }
                    }
                    string text = JsonHelper.Serialize(list.ToArray());
                    Common2.ExecuteNoQuery(string.Concat(new string[]
                    {
                        "update ",
                        this.tbName,
                        " set ",
                        this.field,
                        " = '",
                        text,
                        "' where ",
                        this.idName,
                        " = '",
                        current,
                        "'"
                    }));
                }
                goto IL_22D;
            }
        }
        System.Collections.Generic.List <string> listFromJson2 = JsonHelper.GetListFromJson(this.hfldUserCodes.Value);
        string text2 = JsonHelper.Serialize(listFromJson2.ToArray());

        Common2.ExecuteNoQuery(string.Concat(new string[]
        {
            "update ",
            this.tbName,
            " set ",
            this.field,
            " = '",
            text2,
            "' where ",
            this.idName,
            " = '",
            this.id,
            "'"
        }));
IL_22D:
        base.RegisterScript("saveEvent();");
    }