Esempio n. 1
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        DateTime dateTime = default(DateTime);

        dateTime = DateTime.Now;
        DateTime dateTime2 = default(DateTime);

        dateTime2 = Convert.ToDateTime(this.txtCallDate.Text);
        Hashtable hashtable = new Hashtable();

        hashtable.Add("UserCode", SqlStringConstructor.GetQuotedString(this.UserCode));
        hashtable.Add("RecordDate", SqlStringConstructor.GetQuotedString(dateTime.ToString("yyyy-MM-dd")));
        hashtable.Add("MeetingTitle", SqlStringConstructor.GetQuotedString(this.txtMeetingTitle.Text));
        hashtable.Add("MeetingPlace", SqlStringConstructor.GetQuotedString(this.txtMeetingPlace.Text));
        hashtable.Add("CallDate", SqlStringConstructor.GetQuotedString(dateTime2.ToString("yyyy-MM-dd")));
        hashtable.Add("CallTime", this.ddltCallTime.SelectedValue.ToString());
        hashtable.Add("CallMinute", this.ddltCallMinute.SelectedValue.ToString());
        hashtable.Add("Content", SqlStringConstructor.GetQuotedString(this.txtContent.Text));
        hashtable.Add("State", "0");
        hashtable.Add("PigeonholeState", SqlStringConstructor.GetQuotedString("0"));
        if (this.RecordID == 0)
        {
            if (ConferenceManage.AddMeetingInfo(hashtable))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
        else
        {
            string where = " where RecordID = " + this.RecordID.ToString();
            if (ConferenceManage.UpdMeetingInfo(hashtable, where))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
    }
Esempio n. 2
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        Hashtable hashtable = new Hashtable();

        hashtable.Add("SummaryName", SqlStringConstructor.GetQuotedString(this.txtSummary.Text));
        if (this.txtFilePath.HasFile)
        {
            HttpPostedFile postedFile = this.txtFilePath.PostedFile;
            com.jwsoft.pm.entpm.action.FileUpload fileUpload = new com.jwsoft.pm.entpm.action.FileUpload();
            string[] array = fileUpload.Upload(postedFile, 4);
            hashtable.Add("OriginalName", SqlStringConstructor.GetQuotedString(array[0]));
            hashtable.Add("FilePath", SqlStringConstructor.GetQuotedString(array[1]));
        }
        string where = " where RecordId = " + this.MeetingInfoID.ToString();
        if (ConferenceManage.UpdMeetingInfo(hashtable, where))
        {
            this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
            return;
        }
        this.JS.Text = "alert('保存失败!');";
    }
Esempio n. 3
0
    protected void ImageBtn_Click(object sender, ImageClickEventArgs e)
    {
        com.jwsoft.pm.entpm.action.FileUpload fileUpload = new com.jwsoft.pm.entpm.action.FileUpload();
        string value = this.hdnFilePath.Value;

        if (fileUpload.Delete(value))
        {
            this.tr_add.Visible  = true;
            this.tr_edit.Visible = false;
            Hashtable hashtable = new Hashtable();
            hashtable.Add("OriginalName", SqlStringConstructor.GetQuotedString(""));
            hashtable.Add("FilePath", SqlStringConstructor.GetQuotedString(""));
            hashtable.Add("State", "2");
            string where = " where RecordId = " + this.MeetingInfoID.ToString();
            if (ConferenceManage.UpdMeetingInfo(hashtable, where))
            {
                this.JS.Text = "alert('附件删除成功!');";
                return;
            }
            this.JS.Text = "alert('附件删除失败!');";
        }
    }