Exemple #1
0
    private bool OpenClose(string strWASH_STATUS)
    {
        bool bResult = false;

        SaveData();//先儲存畫面資料

        DataTable dtGV1 = (DataTable)Session[PageTimeStamp.Value + GridView1.ID];
        DataTable dtGV2 = (DataTable)Session[PageTimeStamp.Value + GridView2.ID];
        DataRow[] drPays = dtGV1.Select("chkClose=1");
        DataRow[] drInvDisTemps = dtGV2.Select("chkClose=1");
        CAAModel.MaintainAccountRecord BCO = new CAAModel.MaintainAccountRecord(ConntionDB);

        ParameterList.Clear();
        ParameterList.Add(drPays);
        ParameterList.Add(drInvDisTemps);
        ParameterList.Add(Session["UID"].ToString());
        ParameterList.Add(DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"));

        if (strWASH_STATUS == "1") //解除結案
            bResult = BCO.ChangeRecordByOpen(ParameterList);
        else //結案
            bResult = BCO.ChangeRecordByClose(ParameterList);

        return bResult;
    }