当前位置: 首页>>代码示例>>C#>>正文


C# Data.add方法代码示例

本文整理汇总了C#中DataTier.Data.add方法的典型用法代码示例。如果您正苦于以下问题:C# Data.add方法的具体用法?C# Data.add怎么用?C# Data.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataTier.Data的用法示例。


在下文中一共展示了Data.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: uploadXray

    protected void uploadXray(object sender, EventArgs e)
    {
        if ("".Equals(name.Text))
        {
            alertAndGoback("Pleas, input a name of X-ray");
            return;
        }
        if( "".Equals(xRay.Value))
        {
            alertAndGoback("Pleas, input a file of X-ray");
            return;
        }
        if (xRay.Value.IndexOf(".asp") > -1 ||
            xRay.Value.IndexOf(".jsp") > -1 ||
            xRay.Value.IndexOf(".html") > -1)
        {
            alertAndGoback("Pleas, it is a wrong file");
            return;
        }

        Data data = new Data();
        data.add("pId", pId.Value);
        data.add("historyId", historyId.Value);
        data.add("TestResultID", testId.Value);
        data.add("path", WriteFile(xRay, testId.Value));
        data.add("name", name.Text);
        biz.create(data);
        Data result = biz.view(data);
        xrayView.DataSource = result.Source;
        xrayView.DataBind();
    }
开发者ID:hyori7,项目名称:Hospital,代码行数:31,代码来源:create.aspx.cs

示例2: Fire

 protected override void Fire(object sender, EventArgs e)
 {
     if (!UserInfo.isDoctor(Session))
     {
         alertAndGoback("you are not a doctor. Please login");
         return;
     }
     DBC dbc = new DBC();
     Data data = new Data();
     data.add("doctorId", UserInfo.getId(Session));
     data.add("surgeryId", Param.get("surgeryId"));
     /*dbc.open();
     result = dbc.select("SELECT * FROM DoctorsSurgery A, Users B WHERE A.UserID = B.UserID AND A.SurgeryID = @surgeryId", data);
     dbc.close();*/
     SurgeryBiz biz = new SurgeryBiz();
     Data result = biz.view(data);
     type.DataSource = biz.getType(data).Source;
     type.DataBind();
     userNameLabel.Text = result.getString("UserSurName") + "," + result.getString("UserFirstName") + ",ID:" + result.getString("UserID");
     ROS.Text = result.getString("UserROS");
     DOS.Text = result.getString("UserDOS");
     surgery_description.Text = result.getString("UserSD");
     surgeryse.Text = result.getString("UserSSE");
     Memo.Text = result.getString("Memo");
     UserID.Text = result.getString("UserID");
     SurgeryID.Text = result.getString("SurgeryID");
     type.SelectedValue = result.getString("type");
     ROS.SelectedValue = result.getString("ROS");
 }
开发者ID:hyori7,项目名称:Hospital,代码行数:29,代码来源:View.aspx.cs

示例3: getItemReport

        /// <summary>
        /// get a report for items
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public Data getItemReport(Data data)
        {
            String startDate = data.getString("startDate");
            String endDate = data.getString("endDate");
            String today = DateTime.Now.Date.ToString().Substring(0,10);
            if ("".Equals(startDate))
            {
                data.add("startDate",today);
            }
            if ("".Equals(startDate))
            {
                data.add("endDate", today);
            }
            String query = @"SELECT G.Item, G.Price, COUNT(M.ItemId) AS How_many_times, SUM(G.Price) AS Total
                            FROM Medicine M, GeneralPayment G, history H
                            WHERE H.historyId = M.historyId
                                AND M.ItemId = G.ID
                                AND M.state < 9
                                AND H.date >= CONVERT(datetime, @startDate, 103)
                                AND H.date <= CONVERT(datetime, @endDate, 103)
                            GROUP BY G.Item, G.price
                            ORDER BY G.Item ASC";

            return select(query, data);
        }
开发者ID:hyori7,项目名称:Hospital,代码行数:30,代码来源:ReportData.cs

示例4: Fire

    protected override void Fire(object sender, EventArgs e)
    {
        if (!UserInfo.isMriOperator(Session))
        {
            alertAndGoback("you are not a MRI operator. Please login");
            return;
        }
        //DBC dbc = new DBC();
        //dbc.open();
        String hId = Param.getString("hId");
        Data data = new Data();
        data.add("doctorId", UserInfo.getId(Session));

        //Data result = dbc.select("Select * From Users WHERE JobCode = 0 and UserID in (SELECT patientId FROM history WHERE staffId = @doctorId)", data);
        //dbc.close();
        DoctorPatientsBiz biz = new DoctorPatientsBiz();

        if (!"".Equals(hId))
        {
            data.add("hId", hId);
            biz.done(data);
        }
        Data result = biz.list(Param.getString("searchField"), Param.getString("searchValue"), data);
        Patientlist.DataSource = result.Source;
        Patientlist.DataBind();
        //error.Text = result.ErrorMessage;
    }
开发者ID:hyori7,项目名称:Hospital,代码行数:27,代码来源:list.aspx.cs

示例5: Fire

    protected override void Fire(object sender, EventArgs e)
    {
        if (!UserInfo.isReceptionist(Session))
        {
            alertAndGoback("PLEASE, LOGIN");
            return;
        }
        if (Text.isEmpty(Param.getString("historyId")))
        {
            alertAndGoback("please, select a history id");
        }
        Receptionist rec = new Receptionist();
        Data result = rec.view(Param);
        Data pParam = new Data();
        pParam.add("searchValue", result.get("UserID"));
        pParam.add("searchField", "UserID");
        Data patient = rec.getPatient(pParam);
        Data staffList = rec.getStaff(Param);

        patientId.DataSource = patient.Source;
        patientId.DataBind();

        staffId.DataSource = staffList.Source;
        staffId.DataBind();

        historyId.Text = result.getString("historyId");
        memo.Text = result.getString("memo");
        patientId.SelectedValue = result.getString("patientId");
        staffId.SelectedValue = result.getString("staffId");
        date.Text = result.getString("date").Substring(0, 10);
    }
开发者ID:hyori7,项目名称:Hospital,代码行数:31,代码来源:view.aspx.cs

示例6: delete

 protected void delete(string pId, string roomId)
 {
     Data data = new Data();
     data.add("PatientID", pId);
     data.add("RoomID", roomId);
     AssignBiz assign = new AssignBiz();
     assign.delete(data);
     go("/hospital/aspx/nurse/patientroom/assign.aspx?RoomID=" + roomId);
 }
开发者ID:hyori7,项目名称:Hospital,代码行数:9,代码来源:assign.aspx.cs

示例7: Fire

    protected override void Fire(object sender, EventArgs e)
    {
        if (!UserInfo.isReceptionist(Session))
        {
            alertAndGoback("PLEASE, LOGIN");
            return;
        }
        float rate;
        Data data = new Data();
        pId.Value = Param.getString("pId");
        data.add("patientId", Param.getString("pId"));
        List<Data> result = biz.view(data);

        rate = float.Parse(result[2].getString("rate"));
        rate = 100 - rate;
        int count = result[0].Count;
        float total = 0;
        for (int i = 0; i < count; i++)
        {
            float price = float.Parse(result[0].getString(i,"Price"));
            if ("0".Equals(result[0].getString(i, "insuranceState")))
            {
                price = (price * rate) / 100;
            }
            price = (price - price % (float)0.01);
            result[0].add(i, "afterPrice", price);
            result[0].add(i, "date", result[0].getString(i, "date").Substring(0, 10));
            total += price;
        }
        count = result[1].Count;
        for (int i = 0; i < count; i++)
        {
            float price = float.Parse(result[1].getString(i, "T_Price"));
            if ("0".Equals(result[1].getString(i, "insuranceState")))
            {
                price = (price * rate) / 100;
            }
            price = (price - price % (float)0.01);
            result[1].add(i, "afterPrice", price);
            result[1].add(i, "date", result[1].getString(i, "date").Substring(0, 10));
            total += price;
        }

        historyView.DataSource = result[0].Source;
        historyView.DataBind();
        medicineView.DataSource = result[1].Source;
        medicineView.DataBind();
        User userBiz = new User();
        data.add("userId", pId.Value );
        Data pData = userBiz.view(data);
        userInfo.Text = pData.getString("UserID") + " [" + pData.getString("UserFirstName") + ", " + pData.getString("UserSurName") + "]";
        totalPrice.Text = total.ToString();
        USEREMAIL.Text = pData.getString("Email");
        INSURANNUMBER.Text = pData.getString("InsuranceNumber");
        CREATEDDATE.Text = DateTime.Now.Date.ToString().Substring(0, 10);
    }
开发者ID:hyori7,项目名称:Hospital,代码行数:56,代码来源:payment.aspx.cs

示例8: onLogin

    protected void onLogin(object sender, EventArgs e)
    {
        Data param = new Data();
        param.add("id", id.Text);
        param.add("pwd", pwd.Text);
        User user = new User();
        user.login(param, Session);
        if (!UserInfo.getLoginState(Session).Equals("OK"))
        {
            alertAndGoback(UserInfo.getLoginState(Session));
        }

        if (UserInfo.IsAdmin(Session))
        {
            go("/hospital/aspx/admin/user/list.aspx");
        }
        else if (UserInfo.isReceptionist(Session))
        {
            go("/hospital/aspx/receptionist/book/list.aspx");
        }
        else if (UserInfo.isXrayOperator(Session))
        {
            go("~/aspx/xray/patients/list.aspx");
        }
        else if (UserInfo.isPharmacist(Session))
        {
            go("/hospital/aspx/pharmacist/patients/list.aspx");
        }

        else if (UserInfo.isCheif(Session))
        {
            go("/hospital/aspx/nurse/patientroom/list.aspx");
        }
        else if (UserInfo.isMriOperator(Session))
        {
            go("~/aspx/MRI/patients/list.aspx");
        }
        else if (UserInfo.IsSysAdmin(Session))
        {
            go("~/aspx/payment/general/list.aspx");
        }
        else if (UserInfo.isDoctor(Session))
        {
            go("~/aspx/doctor/patients/list.aspx");
        }
        else if (UserInfo.isNurse(Session))
        {
            go("~/aspx/nurse/patients/list.aspx");

        }
    }
开发者ID:hyori7,项目名称:Hospital,代码行数:51,代码来源:Login.aspx.cs

示例9: Fire

 protected override void Fire(object sender, EventArgs e)
 {
     if (!UserInfo.isNurse(Session))
     {
         alertAndGoback("you are not a nurse. Please login");
         return;
     }
     Data data = new Data();
     data.add("nurseId", UserInfo.getId(Session));
     nurseID.Text = UserInfo.getId(Session);
     data.add("pID", Param.getString("pId"));
     UserID.Text = Param.getString("pId");
     userNameLabel.Text = Param.getString("pId");
 }
开发者ID:hyori7,项目名称:Hospital,代码行数:14,代码来源:create.aspx.cs

示例10: list

        /// <summary>
        /// select patient
        /// </summary>
        /// <param name="field"></param>
        /// <param name="value"></param>
        /// <param name="data"></param>
        /// <returns></returns>
        public Data list(Data data)
        {
            String today = DateTime.Now.Date.ToString().Substring(0, 10);
            data.add("today", today);
            String query = @"SELECT *,
                                (SELECT COUNT(*) FROM NursesForm N
                                WHERE N.UserID = P.PatientID
                                    AND N.state = 0
                                    AND N.date = convert(datetime, @today, 103)

                                )AS Observation
                            FROM Room R, patientRoom P, Users U
                            WHERE P.Room = R.RoomID
                                AND R.UserId = @NurseID
                                AND U.UserID = P.PatientID
                                AND P.StartDate <= convert(datetime, @today, 103)
                                AND P.EndDate >= convert(datetime, @today, 103)
                                ORDER BY P.PatientID ASC";
            Data result = select(query, data);
            int count = result.Count;
            for (int i = 0; i < count; i++)
            {
                result.add(i, "StartDate", result.getString(i, "StartDate").Substring(0,10));
                result.add(i, "EndDate", result.getString(i, "EndDate").Substring(0, 10));
            }
            return result;
        }
开发者ID:hyori7,项目名称:Hospital,代码行数:34,代码来源:Patient.cs

示例11: Fire

    protected override void Fire(object sender, EventArgs e)
    {
        bool isOkay = false;
        if (UserInfo.isNurse(Session) || UserInfo.isDoctor(Session))
        {
            isOkay = true;
        }

        if (!isOkay)
        {
            alertAndGoback("you are not a nurse. Please login");
            return;
        }
        Data data = new Data();
        data.add("nurseId", UserInfo.getId(Session));
        if (!"".Equals(Param.getString("pId")))
        {
            data.add("pID", Param.get("pId"));
        }
        else
        {
            data.add("cntId", Param.get("cntId"));
        }

        ObservationBiz updateview = new ObservationBiz();
        Data result = updateview.view(data);
        userNameLabel.Text = result.getString("UserID");
        head.SelectedValue = result.getString("head");
        ear.SelectedValue = result.getString("ear");
        drum.SelectedValue = result.getString("drum");
        nose.SelectedValue = result.getString("nose");
        sinus.SelectedValue = result.getString("sinus");
        mouth.SelectedValue = result.getString("mouth");
        eye.SelectedValue = result.getString("eye");
        opthal.SelectedValue = result.getString("opthal");
        pupil.SelectedValue = result.getString("pupil");
        ocular.SelectedValue = result.getString("ocular");
        lung.SelectedValue = result.getString("lung");
        heart.SelectedValue = result.getString("heart");
        vascular.SelectedValue = result.getString("vascular");
        abdomen.SelectedValue = result.getString("abdomen");
        memo.Text = result.getString("memo");
        UserID.Text = result.getString("UserID");
        ObservationID.Text = result.getString("id");
        date.Text = result.getString("date");
    }
开发者ID:hyori7,项目名称:Hospital,代码行数:46,代码来源:view.aspx.cs

示例12: create

 /// <summary>
 /// create a new surgery data
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 public override bool create(Data data)
 {
     dbc = new DBC();
     dbc.open();
     Object SurgeryID = dbc.select("SELECT COUNT(SurgeryID) + 1 AS MAX_ID FROM DoctorsSurgery", data).get("MAX_ID");
     data.add("SurgeryID", SurgeryID);
     dbc.update(@"INSERT INTO DoctorsSurgery
             (DoctorID, SurgeryID, type, UserID, UserDOS, UserROS, UserSD, UserSSE, Memo, state)
             VALUES  (@DoctorID, @SurgeryID, @type, @UserID, convert(datetime, @DOS, 103), @ROS, @surgery_description, @surgeryse, @Memo, 0)", data);
     data.add("historyId", dbc.select(@"SELECT MAX(historyId) +1 AS MAX_ID FROM history", data).get("MAX_ID"));
     // based on the type, patient's payment price will be decided.
     dbc.update(@"INSERT INTO history
         (patientId, historyId, staffId, memo, type, cntId, date, payId)
          VALUES   (@UserID, @historyId, @DoctorID, @Memo, 2, @SurgeryID, CONVERT(datetime, @DOS, 103), @type)", data);
     dbc.close();
     return true;
 }
开发者ID:hyori7,项目名称:Hospital,代码行数:22,代码来源:Surgery.cs

示例13: onComplete

 protected void onComplete(object sender, EventArgs e)
 {
     Data data = new Data();
     DoctorPatientsBiz dBiz = new DoctorPatientsBiz();
     data.add("hId", Param.getString("historyId"));
     dBiz.done(data);
     go("~/aspx/xray/patients/list.aspx");
 }
开发者ID:hyori7,项目名称:Hospital,代码行数:8,代码来源:create.aspx.cs

示例14: Fire

 protected override void Fire(object sender, EventArgs e)
 {
     Data data = new Data();
     data.add("DeptName", Param.get("DeptName"));
     RoomBiz biz = new RoomBiz();
     Data result = biz.list(data);
     RoomList.DataSource = result.Source;
     RoomList.DataBind();
 }
开发者ID:hyori7,项目名称:Hospital,代码行数:9,代码来源:list.aspx.cs

示例15: create

 /// <summary>
 /// create new data for nurse form and update patient history
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 public override bool create(Data data)
 {
     String today = DateTime.Now.Date.ToString().Substring(0, 10);
     data.add("today", today);
     dbc = new DBC();
     dbc.open();
     Object ID = dbc.select("SELECT COUNT(id) + 1 AS MAX_ID FROM NursesForm", data).get("MAX_ID");
     data.add("id", ID);
     dbc.update(@"INSERT INTO NursesForm
         (UserID, id, head, ear, drum, nose, sinus, mouth, eye, opthal, pupil, ocular, lung, heart, vascular, abdomen, memo, date, state)
          VALUES   (@UserID, @id, @head, @ear, @drum, @nose, @sinus, @mouth, @eye, @opthal, @pupil, @ocular, @lung, @heart, @vascular, @abdomen, @memo, convert(datetime, @today, 103), 0)", data);
     data.add("historyId", dbc.select(@"SELECT MAX(historyId) +1 AS MAX_ID FROM history", data).get("MAX_ID"));
     dbc.update(@"INSERT INTO history
         (patientId, historyId, staffId, memo, type, cntId, date, payId)
          VALUES   (@UserID, @historyId, @nurseID, @memo, 3, @id, getDate(), 14)", data);
     dbc.close();
     return true;
 }
开发者ID:hyori7,项目名称:Hospital,代码行数:23,代码来源:Observation.cs


注:本文中的DataTier.Data.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。