Exemplo n.º 1
0
        private void DeleteCase()
        {
            if (Request.Form["id"] != null)
            {
                int del=CompanyCase.Delete(Convert.ToInt32(Request.Form["id"]), SupplierId);
                if (del > 0)
                {
                    //ͬ������Minisite�İ���
                    MinisiteWriter mw = new MinisiteWriter(SupplierId);
                    mw.UpdateCases(true);

                    Response.Write("true");
                    return;
                }
                else
                {
                    Response.Write("setMessage('�ð����Ѿ������ۻ������ڵȴ����ۣ�����ɾ����',false);");
                    return;
                }
            }
            else
            {
                Response.Write("setMessage('ɾ��ʧ�ܣ�',false);");
            }
        }
Exemplo n.º 2
0
        private void SaveCase()
        {
            if (Request.Form["caseTitle"] != null &&
                Request.Form["caseCate"] != null &&
                Request.Form["cName"] != null &&
                Request.Form["cIndustry"] != null &&
                Request.Form["cUrl"] != null &&
                Request.Form["casePeriod"] != null &&
                Request.Form["caseBground"] != null &&
                Request.Form["caseDesc"] != null &&
                Request.Form["caseResult"] != null &&
                Request.Form["caseId"] != null)
            {
                int cid = Convert.ToInt32(Request.Form["caseId"]);
                CompanyCase ca = new CompanyCase(SupplierId);
                ca.Title = Request.Form["caseTitle"].Trim();
                ca.Category = Request.Form["caseCate"].Trim();
                ca.ClientName = Request.Form["cName"].Trim();
                ca.ClientIndustry = Request.Form["cIndustry"].Trim();
                ca.ClientWebsite = Request.Form["cUrl"].Trim();
                ca.Period = Request.Form["casePeriod"].Trim();
                ca.Background = Request.Form["caseBground"].Trim();
                ca.Description = Request.Form["caseDesc"].Trim();
                ca.Result = Request.Form["caseResult"].Trim();
                if (ca.Save(cid))
                {
                    //ͬ������Minisite�İ���
                    MinisiteWriter mw = new MinisiteWriter(SupplierId);
                    mw.UpdateCases(true);

                    Response.Write(ca.Id);
                    return;
                }

                Response.Write(0);
                return;
            }
            else
            {
                Response.Write(0);
            }
        }